2013-05-13 286 views
0

在我的cmd中給出「rails s」命令時出現以下錯誤。錯誤在鏈接中給出。 我使用MongoDB的作爲我的數據庫,而不是mysql.'pls建議做什麼Ruby ON rails- Webrick

http://paste.kde.org/742976

- 相關剪輯---

=> Booting WEBrick 
=> Rails 3.2.13 application starting in development on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
Exiting 
C:/Ruby200/lib/ruby/gems/2.0.0/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:251:in `require': Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (cannot load such file --sqlite3/sqlite3_native) (LoadError) 
+0

可以粘貼你的Gemfile? – stephenmurdoch 2013-05-13 19:58:44

回答

0

假設你使用的是ODM像Mongoid你將需要擺脫ActiveRecord才能正確使用MongoDB。

說明這裏應該是有幫助的:http://mongoid.org/en/mongoid/docs/installation.html

Open myapp/config/application.rb and near the top, remove the line require "rails/all" 
+0

這根本不是真的。我在一個應用程序中使用mongoid和MySQL + postgres和AR。 – cpuguy83 2013-05-14 03:17:31

+0

@ cpuguy83我不是說你不能一起使用它們。 OP在使用MongoDB和不使用MySQL之類的時候詢問如何解決這個錯誤信息 - 這只是一個建議。 – 2013-05-14 05:37:09