πŸ“œ ⬆️ ⬇️

Manual installation of Ruby 1.8.7 and Rails on Windows XP

I wrote it once for myself, but I thought - β€œWhat if someone comes in handy too?”

So, install Ruby. For this you need:

  1. Download binaries for Ruby 1.8.7 here: http://www.ruby-lang.org/en/downloads/ . Unpack them into the desired directory (for example, in c: \ ruby ).
  2. open My Computer β†’ Properties β†’ Advanced β†’ Enviromental Variables , and add the following string " c: \ ruby ​​\ bin \ " to the Path variable (this depends on where you unpacked the binaries)
  3. Download the zlib package here: http://www.zlib.net/zlib123-dll.zip . From it, get the file zlib1.dll , rename it to zlib.dll and place it at c: \ ruby ​​\ bin \
  4. Download the iconv package here: http://sourceforge.net/project/showfiles.php?group_id=25167&package_id=51458 . In the archive, find the file iconv.dll and copy it to the address c: \ ruby ​​\ bin \
  5. Download and install the OpenSSL library from here: http://www.slproweb.com/products/Win32OpenSSL.html
  6. Download rubygems here: http://rubyforge.org/frs/?group_id=126 . Unpack the archive, find the file setup.rb and run the command ruby setup.rb in the console
Now you need to install Rails. For this you need:
  1. in the console execute the gem install rails command
  2. in the console execute the command gem install sqlite3-ruby -v 1.2.3
  3. Download and SQLite3 library here: http://www.sqlite.org/download.html . Unpack the sqlite3.dll file from the downloaded archive into the folder with: \ ruby ​​\ bin \
The last two points are needed in order to run the Rails application out of the box, where the use of the SQLite database is originally written in the configuration.
')
Now you need to check how Rails works. For this you need:
  1. in the console, execute the rails my_projects_name_with_path command (for example: " rails d: / my_blog ") - thus, we will create an empty application framework
  2. go to the folder with the created skeleton and execute the ruby script / server command in the console - thus we will launch our empty Rails program
  3. in your browser go to localhost: 3000
  4. on the page that opens, click on the link " About your application's environment " - thus, the versions of the installed Rails should be shown

Thanks to the kind people who once answered the question about installing Ruby on the site stackoverflow.com , thereby encouraging me to understand everything in detail and write this little guide-memo.

Source: https://habr.com/ru/post/59436/


All Articles