Topic: Rails 2.3.11 on Ubuntu 10.04 LTS

I'm trying to set up a development environment on an Ubuntu virtual machine that matches the setup at a Joyent shared hosting account.  That setup is running Rails 2.3.11 with Ruby 1.8.7 patchlevel 334.

I'm getting an error about openssl being missing when I try to start up mongrel or webrick.  Also lots of warnings about Gem.source_index being deprecated.

Any help would be greatly appreciated!

$ ruby -v
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]

$ rails -v
Rails 2.3.11

$ script/server mongrel
=> Booting Mongrel
=> Rails 2.3.11 application starting on http://0.0.0.0:3000
NOTE: Gem.source_index is deprecated, use Specification. It will be removed on or after 2011-11-01.
Gem.source_index called from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/rails/gem_dependency.rb:21.
NOTE: Gem::SourceIndex#refresh! is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#refresh! called from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/rails/vendor_gem_source_index.rb:34.
NOTE: Gem::SourceIndex#load_gems_in is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#load_gems_in called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:322.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#add_spec is deprecated, use Specification.add_spec. It will be removed on or after 2011-11-01.
Gem::SourceIndex#add_spec called from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:127.
NOTE: Gem::SourceIndex#initialize is deprecated with no replacement. It will be removed on or after 2011-11-01.
Gem::SourceIndex#initialize called from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/rails/vendor_gem_source_index.rb:100.

/home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/initializer.rb:271:in `require_frameworks': no such file to load -- openssl (RuntimeError)
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/initializer.rb:134:in `process'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/initializer.rb:113:in `send'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/initializer.rb:113:in `run'
    from /home/dow/railsdev/test2/config/environment.rb:9
    from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:547:in `new_constants_in'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/activesupport-2.3.11/lib/active_support/dependencies.rb:182:in `require'
    from /home/dow/.rvm/gems/ruby-1.8.7-p334/gems/rails-2.3.11/lib/commands/server.rb:84
    from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /home/dow/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from script/server:3


Here's the listing of rubies and gems:

dow@ubuntu:~/railsdev/test2$ rvm list

rvm rubies

=* ruby-1.8.7-p334 [ i686 ]
   ruby-1.8.7-p357 [ i686 ]

# => - current
# =* - current && default
#  * - default

dow@ubuntu:~/railsdev/test2$ gem list

*** LOCAL GEMS ***

actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
bundler (1.0.22 ruby)
rack (1.1.3)
rails (2.3.11)
rake (0.9.2)

Re: Rails 2.3.11 on Ubuntu 10.04 LTS

With that version of rails (really 2.3.14) I use rake 0.9.2.2 and rubygems version 1.4.2.  I believe those two programs are the source of the problems you are seeing.  Check on your reference system to see what versions they are using.

Last edited by norm (2012-02-12 16:40:53)

Re: Rails 2.3.11 on Ubuntu 10.04 LTS

Thanks, norm.  I did $rvm install rubygems 1.4.2
but I got this error:

Error running 'GEM_PATH="/home/dow/.rvm/gems/ruby-1.8.7-p334:/home/dow/.rvm/gems/ruby-1.8.7-p334@global:/home/dow/.rvm/gems/ruby-1.8.7-p334:/home/dow/.rvm/gems/ruby-1.8.7-p334@global" GEM_HOME="/home/dow/.rvm/gems/ruby-1.8.7-p334" "/home/dow/.rvm/rubies/ruby-1.8.7-p334/bin/ruby" "/home/dow/.rvm/src/rubygems-1.4.2/setup.rb"', please read /home/dow/.rvm/log/ruby-1.8.7-p334/rubygems.install.log
Installation of rubygems did not complete successfully.
$ cat .rvm/log/ruby-1.8.7-p334/rubygems.install.log 
[2012-02-13 09:33:34] GEM_PATH="/home/dow/.rvm/gems/ruby-1.8.7-p334:/home/dow/.rvm/gems/ruby-1.8.7-p334@global:/home/dow/.rvm/gems/ruby-1.8.7-p334:/home/dow/.rvm/gems/ruby-1.8.7-p334@global" GEM_HOME="/home/dow/.rvm/gems/ruby-1.8.7-p334" "/home/dow/.rvm/rubies/ruby-1.8.7-p334/bin/ruby" "/home/dow/.rvm/src/rubygems-1.4.2/setup.rb"
File not found: README
RubyGems 1.4.2 installed

edit: I updated rake to 0.9.2.2.  Here's my gem list:
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
bundler (1.0.22)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.8)
fastthread (1.0.7)
gem_plugin (0.2.3)
mongrel (1.1.5)
rack (1.1.3)
rails (2.3.11)
rake (0.9.2.2, 0.9.2)

edit: when I did $gem -v at first, I got 1.8.15, but after doing $rvm install rubygems 1.4.2, $gem -v gives 1.4.2
edit: I'm getting an error about openssl (no such file to load)
edit: If it would be simpler than fixing this, I don't mind uninstalling my current ruby/rails environment and starting over with a clean install if I can find good instructions on how to do the uninstall/reinstall...

Last edited by ddrake (2012-02-13 14:40:41)

Re: Rails 2.3.11 on Ubuntu 10.04 LTS

It's not really a solution, so I hestitate to post...  I needed to get a local dev server running in a finite time frame so I ended up just following all the steps in this post:
http://ascarter.net/2010/05/10/rails-de … 10.04.html
then removing rvm (don't forget to remove the line from .bashrc).

That had the effect of upgrading rails to 3.2.1, which is not what I originally had in mind, but luckily my rails 2 apps, which run fine under rails 2.3.11, also turn out to run under rails 3.2.1.  I didn't upgrade ruby.  It's now at 1.87 patchlevel 249.  Webrick doesn't work, but mongrel is all I need.