Ruby rails сервер WEBrick выходит с ошибками я не понимаю - PullRequest
0 голосов
/ 21 декабря 2011

Я создал приложение, но когда я запускаю сервер rails, я получаю следующий вывод. Кто-нибудь указывает мне правильное направление относительно того, что я делаю неправильно, пожалуйста? Я выдергиваю волосы!

=> 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
/usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require': no such file to load -- openssl (LoadError)
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/session/cookie.rb:1
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:640:in `new_constants_in'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:223:in `load_dependency'
    from /usr/local/lib/ruby/gems/1.8/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in `require'
    from /usr/local/lib/ruby/gems/1.8/gems/actionpack-3.1.3/lib/action_dispatch/middleware/session/cookie_store.rb:4
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application/configuration.rb:131:in `const_get'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application/configuration.rb:131:in `session_store'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:172:in `default_middleware_stack'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:146:in `tap'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:146:in `default_middleware_stack'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/engine.rb:446:in `build_middleware_stack'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application/finisher.rb:37
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `instance_exec'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:30:in `run'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:55:in `run_initializers'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `each'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/initializable.rb:54:in `run_initializers'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/application.rb:96:in `initialize!'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `send'
    from /usr/local/lib/ruby/gems/1.8/gems/railties-3.1.3/lib/rails/railtie/configurable.rb:30:in `method_missing'
    from /home/khussain/delete/config/environment.rb:5
    from /home/khussain/delete/config.ru:4:in `require'
    from /home/khussain/delete/config.ru:4
    from /usr/local/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/builder.rb:51:in `instance_eval'
    from /usr/local/lib/ruby/gems/1.8/gems/rack-1.3.5/lib/rack/builder.rb:51:in `initialize'
    from /home/khussain/delete/config.ru:1:in `new'
    from /home/khussain/delete/config.ru:1

Ответы [ 2 ]

1 голос
/ 21 декабря 2011

Если вышеперечисленное не работает, то, возможно, это из-за того, что у вас нет .Gemfile?

0 голосов
/ 21 декабря 2011

Похоже, драгоценный камень отсутствует (openssl), я не уверен, что не вижу кода.

Лучше всего было бы бежать:

bundle install

Если это не помогло, попробуйте добавить openssl в ваш Gemfile и снова запустить bundle install

...