8 Replies - 3328 Views - Last Post: 17 February 2012 - 07:51 AM Rate Topic: -----

#1 SanmanX  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 32
  • Joined: 11-January 12

rails server not working

Posted 13 February 2012 - 01:07 PM

Hey guys I am having a problem running a rails server and I don't know what the issue is. I am new to ruby, here is what the message looks like:

ksan@ksan-VirtualBox:~/blog$ rails server
=> Booting WEBrick
=> Rails 3.1.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
Exiting
/home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': cannot load such file -- openssl (LoadError)
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/session/cookie.rb:1:in `<top (required)>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `block in require'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `block in load_dependency'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.1.3/lib/action_dispatch/middleware/session/cookie_store.rb:4:in `<top (required)>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application/configuration.rb:131:in `const_get'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application/configuration.rb:131:in `session_store'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application.rb:172:in `block in default_middleware_stack'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application.rb:146:in `tap'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application.rb:146:in `default_middleware_stack'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/engine.rb:446:in `app'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `block in run_initializers'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
	from /home/ksan/blog/config/environment.rb:5:in `<top (required)>'
	from /home/ksan/blog/config.ru:4:in `require'
	from /home/ksan/blog/config.ru:4:in `block in <main>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/builder.rb:51:in `instance_eval'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/builder.rb:51:in `initialize'
	from /home/ksan/blog/config.ru:1:in `new'
	from /home/ksan/blog/config.ru:1:in `<main>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/builder.rb:40:in `eval'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/builder.rb:40:in `parse_file'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/server.rb:200:in `app'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/server.rb:46:in `app'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/server.rb:301:in `wrapped_app'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/rack-1.3.6/lib/rack/server.rb:252:in `start'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands/server.rb:70:in `start'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands.rb:54:in `block in <top (required)>'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
	from /home/ksan/.rvm/gems/ruby-1.9.3-p0/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
	from script/rails:6:in `require'
	from script/rails:6:in `<main>'


Is This A Good Question/Topic? 0
  • +

Replies To: rails server not working

#2 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 894
  • View blog
  • Posts: 3,153
  • Joined: 12-May 09

Re: rails server not working

Posted 13 February 2012 - 01:12 PM

I thought rails installed the dependent gems, but I'd double check to make sure that the openssl gem is installed and on the path... if not a gem install openssl might help.
Was This Post Helpful? 0
  • +
  • -

#3 SanmanX  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 32
  • Joined: 11-January 12

Re: rails server not working

Posted 13 February 2012 - 01:18 PM

Now I am getting an error for that:

ksan@ksan-VirtualBox:~$ gem install openssl
ERROR:  Could not find a valid gem 'openssl' (>= 0) in any repository
ERROR:  Possible alternatives: opendsl, opensrs, open_dsl, openurl


Was This Post Helpful? 0
  • +
  • -

#4 MitkOK  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 32
  • View blog
  • Posts: 403
  • Joined: 09-August 07

Re: rails server not working

Posted 13 February 2012 - 01:35 PM

You've compiled ruby without ssl support.

What's your OS and how you installed ruby ?

EDIT: You used rvm. You can run rvm requiremets to see what's needed
rvm requirements


If you're running Ubuntu/Debina:

Quote

sudo apt-get install libssl-dev


Then you need to install ruby again

This post has been edited by MitkOK: 13 February 2012 - 01:38 PM

Was This Post Helpful? 3
  • +
  • -

#5 SanmanX  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 32
  • Joined: 11-January 12

Re: rails server not working

Posted 13 February 2012 - 01:38 PM

I am using Ubuntu 11.10 in a virtual box and installed ruby with rvm.
Was This Post Helpful? 0
  • +
  • -

#6 SanmanX  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 32
  • Joined: 11-January 12

Re: rails server not working

Posted 13 February 2012 - 01:47 PM

Install went fine, but still can't fins openssl, and am i suppose to install in a specific location?
Was This Post Helpful? 0
  • +
  • -

#7 Skaggles  Icon User is offline

  • THE PEN IS MIGHTIER
  • member icon





Reputation: 251
  • View blog
  • Posts: 640
  • Joined: 01-March 09

Re: rails server not working

Posted 13 February 2012 - 04:16 PM

Have to ask, did you follow the instructions of RVM by running rvm requirements after installation to make sure all the requirements of Ruby are satisfied? There are few dependencies you need to install via sudo apt-get install. You can uninstall RVM with rvm implode and re-install it easily. It's entirely located in your home directory and separate from the system.

This post has been edited by Skaggles: 13 February 2012 - 04:17 PM

Was This Post Helpful? 0
  • +
  • -

#8 SanmanX  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 32
  • Joined: 11-January 12

Re: rails server not working

Posted 13 February 2012 - 04:20 PM

I was able to fix it with this steps:

rvm package install openssl

rvm remove 1.9.3

rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
Was This Post Helpful? 3
  • +
  • -

#9 xclite  Icon User is offline

  • LIKE A BOSS
  • member icon


Reputation: 894
  • View blog
  • Posts: 3,153
  • Joined: 12-May 09

Re: rails server not working

Posted 17 February 2012 - 07:51 AM

I just want to thank you for posting the fix. I get so sick of googling problems only to never see the solution.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1