RuntimeError when "ruby script/server"

Hello everybody!

Although I've programming for a long time, I am new with Ruby, as well
as with RoR.
I find both really interesting, therefore I want to start playing with
them.

I managed to get everything working perfectly in my laptop, yet not in
my desktop PC.

Environment:
OS: Ubuntu 9.04
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
gem v1.3.4
Rails v2.3.2

Sthing else?

The current problem is:
sebas@sebas-desktop:~/rails/myapp$ ruby script/server
=> Booting Mongrel
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
/usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:
269:in `require_frameworks': no such file to load -- openssl
(RuntimeError)
  from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:
134:in `process'
  from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:
113:in `send'
  from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:
113:in `run'
  from /home/sebas/rails/myapp/config/environment.rb:9
  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
  from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:156:in `require'
  from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
  from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
active_support/dependencies.rb:156:in `require'
  from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/
server.rb:84
  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `gem_original_require'
  from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
31:in `require'
  from script/server:3

Any idea? Somebody can help me???

Meanwhile, I'll keep myself busy playing with my laptop =)

Cheers!

Sebas.

Hi Sebastian,

Eliminating the noise...

Hi Sebastian,

Eliminating the noise...

> /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:
> 269:in `require_frameworks': no such file to load -- openssl
> from /home/sebas/rails/myapp/config/environment.rb:9

You read the stack trace from bottom to top. In your case...

In environment.rb at line 9 you're requiring the openssl gem but do not
have it installed, at least not where Rails expects it to be.

almost. openssl is part of the ruby standard library, but if you have
installed ruby via your ubuntu's packaging system the openssl stuff is
split into a separate package (don't recall the exact name). If you
built ruby from source yourself the problem is probably that you
didn't have the openssl development headers installed (again, another
package). If you install those you should be able to build & install
the openssl ruby extension

Fred

Hi guys,

thank you for the answer. However, I have already Openssl installed.
Have a look:

sebas@sebas-desktop:~$ openssl

version

OpenSSL 0.9.8g 19 Oct 2007

As I said, I have exactly the same in my laptop, and it's working
great. The only difference is that there I'm running an Ubuntu 8.10,
just an older version.

I really can't find the difference! Hope U can help me!

Sebas.

Hi guys,

thank you for the answer. However, I have already Openssl installed.
Have a look:

sebas@sebas-desktop:~$ openssl

Linux distros frequently split things up so you can have both ruby and
openssl installed without having either the ruby openssl bindings or
openssl but without the development headers for it

Fred

Said slightly differently, you need to check to see that you have the
gem installed and available to Rails as I suggested.

gen list

If it's not in the list, that's your first problem.

HTH,
Bill