# Choose ruby version for a Rails

**URL:** <https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987>\
**Category:** Rails\
**Created:** [June 10, 2010, 11:12pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987 "2010-06-10T23:12:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![johndel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@johndel](https://www.ruby-forum.com/u/johndel)\
**Post date:** [June 10, 2010, 11:12pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987/1 "2010-06-10T23:12:23Z")

</div>

Well I am having a really weird problem, I am working on a project of  
another team and they were using ruby 1.8.7. I has installed ruby  
1.8.6 so I’ve got many ruby errors and I couldn’t figures out why.

Finally I found that the reason was the version of the ruby, I have  
installed RVM and I set 1.8.7 version as default and I ran the app but  
I am still getting those errors.

Can I explicitly setup the ruby version which I want my rails app to  
use? My final solution is to delete ruby 1.8.6 version…

Just for the record, one of the errors I got was that:  
select\_tag “hour”, options\_for\_select(24.times.collect {|i| i}

and here I found the answer:

> **[Elctech.com is for sale | HugeDomains](https://www.hugedomains.com/domain_profile.cfm?d=elctech.com)**
>
> Get a new domain name for your startup. Quick and professional service. Seamless domain transfers.

I have many more errors which I assume that it might be the ruby  
version because the app is live and running smoothly.

Thank you

---

<div class="post-metadata">

**Author:** ![johndel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@johndel](https://www.ruby-forum.com/u/johndel)\
**Post date:** [June 10, 2010, 11:26pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987/2 "2010-06-10T23:26:26Z")

</div>

Well the problem was that I ran the command as a root (sudo script/  
server) so the ruby 1.8.6 was used. When I am running for the version  
1.8.7 I am getting the following errors:

/home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/lib/rails/  
gem\_dependency.rb:119:Warning: Gem::Dependency#version\_requirements is  
deprecated and will be removed on or after August 2010. Use  
#requirement  
/home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/lib/  
initializer.rb:271:in `require_frameworks': no such file to load -- openssl (RuntimeError) from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/ lib/initializer.rb:134:in`process’  
from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/  
lib/initializer.rb:113:in `send' from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/ lib/initializer.rb:113:in`run’  
from /var/www/rails/vmobile/config/environment.rb:12  
from /home/nikos/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/  
site\_ruby/1.8/rubygems/custom\_require.rb:31:in `gem_original_require' from /home/nikos/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/ site_ruby/1.8/rubygems/custom_require.rb:31:in`require’  
from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/  
activesupport-2.3.5/lib/active\_support/dependencies.rb:156:in  
`require' from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/ activesupport-2.3.5/lib/active_support/dependencies.rb:521:in`new\_constants\_in’  
from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/  
activesupport-2.3.5/lib/active\_support/dependencies.rb:156:in  
`require' from /home/nikos/.rvm/gems/ruby-1.8.7-p249/gems/rails-2.3.5/ lib/commands/server.rb:84 from /home/nikos/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/ site_ruby/1.8/rubygems/custom_require.rb:31:in`gem\_original\_require’  
from /home/nikos/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/  
site\_ruby/1.8/rubygems/custom\_require.rb:31:in `require’  
from script/server:3

Any ideas what it might been wrong?

---

<div class="post-metadata">

**Author:** ![johndel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@johndel](https://www.ruby-forum.com/u/johndel)\
**Post date:** [June 11, 2010, 12:32pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987/3 "2010-06-11T12:32:24Z")

</div>

Thank you for your answer but can you be a little more specific? I  
have ubuntu and I have already installed openssl libraries but it  
doesn’t work. I found some guides which says to go at \gems\ruby-1.8.7-  
p249\ext\openssl but I didn’t have the folder /ext/openssl/ .

---

<div class="post-metadata">

**Author:** ![johndel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@johndel](https://www.ruby-forum.com/u/johndel)\
**Post date:** [June 11, 2010, 12:41pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987/4 "2010-06-11T12:41:11Z")

</div>

install ree, and remove all your problems

Ivan N.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![johndel](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/65b543/32.png) [@johndel](https://www.ruby-forum.com/u/johndel)\
**Post date:** [June 10, 2010, 11:37pm UTC](https://www.ruby-forum.com/t/choose-ruby-version-for-a-rails/189987/5 "2010-06-10T23:37:33Z")

</div>

On Thu, Jun 10, 2010 at 5:25 PM, Yiannis [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> initializer.rb:271:in `require\_frameworks’: no such file to load –  
> openssl (RuntimeError)
> 
> Any ideas what it might been wrong?

Install your missing ruby openssl libraries.

–  
Greg D.  
[destiney.com](http://destiney.com) | [gregdonald.com](http://gregdonald.com)
