2012-02-08 60 views
0

我安裝了Ruby 1.8.7,並使用rvm.I創建我的項目和軌道2.3.5當我嘗試使用script/server我得到這個錯誤軌2.3.5故障保護錯誤

=> Booting WEBrick 
=> Rails 2.3.5 application starting on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
[2012-02-08 17:59:53] INFO WEBrick 1.3.1 
[2012-02-08 17:59:53] INFO ruby 1.8.7 (2011-12-28) [i686-darwin11.0.0] 
[2012-02-08 17:59:53] INFO WEBrick::HTTPServer#start: pid=14527 port=3000 
/!\ FAILSAFE /!\ Wed Feb 08 18:00:03 +0530 2012 
    Status: 500 Internal Server Error 
    no such file to load -- sqlite3 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/requires.rb:7:in `require_library_or_gem' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/requires.rb:5:in `require_library_or_gem' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/sqlite3_adapter.rb:10:in `sqlite3_connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/monitor.rb:242:in `synchronize' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:9:in `cache' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/query_cache.rb:28:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/string_coercion.rb:25:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/head.rb:9:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/params_parser.rb:15:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/session/cookie_store.rb:93:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/failsafe.rb:26:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:114:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/reloader.rb:34:in `run' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/actionpack-2.3.5/lib/action_controller/dispatcher.rb:108:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/rails/rack/static.rb:31:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/urlmap.rb:46:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `each' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/urlmap.rb:40:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/rails/rack/log_tailer.rb:17:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/content_length.rb:13:in `call' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/handler/webrick.rb:50:in `service' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:162:in `start' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:95:in `start' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:92:in `each' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:92:in `start' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:23:in `start' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/1.8/webrick/server.rb:82:in `start' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rack-1.0.1/lib/rack/handler/webrick.rb:14:in `run' 
    /Users/anandhegde/.rvm/gems/ruby-1.8.7-p357/gems/rails-2.3.5/lib/commands/server.rb:111 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    /Users/anandhegde/.rvm/rubies/ruby-1.8.7-p357/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 

以及何時啓動服務器我在我的瀏覽器中打開localhost:3000/trip說 很抱歉,但出錯了。

「我們已收到有關此問題的通知,我們很快就會看到它。」

有人知道爲什麼會發生這種情況嗎?

回答

1

具有u安裝sqlite3的寶石及其封裝

1

答案在no such file to load -- sqlite3。您需要安裝sqlite3 gem:gem install sqlite3

我不得不問,爲什麼你使用這樣一個老版本的Rails?如果你需要堅持2.3,那麼你至少應該使用2.3.11版。

+0

因爲我使用的網絡解決方案只使用軌2.3.5卡住。我的應用程序非常靜態,我不需要一個sqlite數據庫或任何數據庫。有沒有一些方法可以告訴rails不要查找sql​​ite? – flobacca 2014-07-23 19:20:23