Installing Rails on Ubuntu 7.10
This is a very short topic which talks about how to install Rails on Ubuntu 7.10.
Usually this process is simple (install the rails through GEM repository) however I had problem in the installation process and I will explain here how solved it.
First of all, you must have Ruby already installed. If you do not have Ruby installed, check this post out: http://www.jairrillo.com/blog/2008/01/05/getting-stated-in-ruby/
Next step is install Rails through GEM repository. Simply put the following command on the Linux shell:
sudo gem1.8 install rails -y
Done! Rails is installed!!
Testing rails
Let’s create a simple rails project to test if the rails has been installed successfully.
First, create the rails project typing the following on the shell:
rails <project name>
A directory with the project name is going to be created.
Note: By default, the rails project is created using sqllite as database. If you want to use mysql instead, you can create a project calling the following parameter: –database=mysql
E.g. rails <project name> –database=mysql
Creating a controller
As mentioned before, I had problem when i tried to create a controller using the generate script.
Create a controller typing in the Linux shell the following command:
ruby script/generate controller test_controller
Hopefully the test_controller will be create without problem, like the image below:
ruby script/generate controller test_controller
exists app/controllers/
exists app/helpers/
create app/views/test_controller
exists test/functional/
create app/controllers/test_controller_controller.rb
create test/functional/test_controller_controller_test.rb
create app/helpers/test_controller_helper.rb
However you can get an error, like this:
usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/initializer.rb:159:in
`require_frameworks': no such file to load -- openssl (RuntimeError)
from /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/
initializer.rb:88:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/
initializer.rb:49:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/
initializer.rb:49:in `run'
from /home/max/Desktop/rails/morpheus/config/environment.rb:13
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/commands/
generate.rb:1
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `gem_original_require'
from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:
27:in `require'
from ./script/generate:3
If you got the error above, you have to install the libopenssl-ruby1.8. Simply put the following line on the shell:
sudo apt-get install libopenssl-ruby1.8
After that, try to create the controller again. Hopefully it will work fine now
I hope this topic be useful for anyone.

Brazilian guy, IT Specialist, Linux and Mac User. Work with Java/JEE and IBM Products, such as: WebSphere and DB2. Like studying Ruby, Android and IOS. Also, I like playing tennis, however I am not good enough. Write a post in this blog once a year. Follow me on twitter if you understand portuguese: @jairrillo.
Hi,
I still got the error message even if I re-installed the libopenssl-ruby1.8.:
“usr/lib/ruby/gems/1.8/gems/rails-2.0.1/lib/initializer.rb:159:in
`require_frameworks’: no such file to load — openssl (RuntimeError)…..”
Any suggestions?
Thanks!
I use Ubuntu 8.04
I’m not using Ubuntu 8.04 yet. Not sure about the error and its solution, sorry
hello
i don’t know how and why, it did the job… my ubuntu hardy heron refused to install rubygems
i notice that the library you suggest was already installed on the system, and that i had to add a couple of libraries:
~$ sudo apt-get install libyaml-ruby (this needs a confirmation)
~$ sudo apt-get install libzlib-ruby (smoothly)
anyway, that was not enough, but your trick solved the problem
thanks a lot…
syb