Installing Ruby and Ruby on Rails in Ubuntu is simple. To install Ruby, ruby \u200b\u200bpackages are needed , ri (ruby information) and irb (interactive ruby).
$ sudo apt-get install ruby \u200b\u200birb ri
Now we can install rubygems from the repositories and get off the latest version (recommended) then install Rails. The version that has Ubuntu (At least in Ubuntu 9.X or 10.04) is 1.3.5. When installing rails with ruby \u200b\u200bgems, we are required to have at least version 1.3.6 of rubygems. If you try to update rubygems:
$ sudo gem update - system
We get an error like this is done through the repositories of Debian / Ubuntu not from the program itself. I chose to download the source code and install it myself and it worked. $ wget http://production.cf.rubygems.org/rubygems/rubygems-1.3.7.tgz
$ tar-xvzf rubygems-1.3.7.tgz $ cd rubygems-1.3.7
$ sudo ruby \u200b\u200bsetup.rb
This we have updated the version of rubygems. Now time to install Rails . $ sudo gem install rails - include-dependencies
Rails3 say that is giving me problems with the configuration database, so another option is to install rails from the Ubuntu repositories with the package name rails. Now, depending on the database we have, we must install the appropriate library for ruby. For example, if you have installed MySQL, then do: $ sudo apt-get install libmysql-ruby-dev libmysqlclient
$ sudo gem install mysql now enjoying Rails!
0 comments:
Post a Comment