Rails 和 SQLITE3 问题
我正在尝试在 Windows XP SP3 上安装“ChiliProject”。一切都很好,直到我尝试处理 db:migrate。
C:\RubyApps\chiliproject>bundle exec rake db:migrate
然后我收到错误:
耙子中止! 没有要加载的文件——sqlite3
我安装了 sqlite3 gem:
sqlite3 (1.3.4 x86-mingw32 x86-mswin32-60)
来自 sqlite.org 的三个文件:sqlite3.exe、sqlite3.dll、sqlite3.def 放在“C:\Ruby192\bin”目录中(这是我的默认红宝石目录)。
数据库配置是(database.yml):
production:
adapter: sqlite3
database: db/production.db
我做错了什么?
I am trying to install "ChiliProject" on my Windows XP SP3. Everything was fine until I tried to process the db:migrate.
C:\RubyApps\chiliproject>bundle exec rake db:migrate
Then I get the error:
rake aborted!
no such file to load -- sqlite3
I have the sqlite3 gem installed:
sqlite3 (1.3.4 x86-mingw32 x86-mswin32-60)
The three files: sqlite3.exe, sqlite3.dll, sqlite3.def from sqlite.org are put in the "C:\Ruby192\bin" directory (which is my default ruby dir).
The database configuration is (database.yml):
production:
adapter: sqlite3
database: db/production.db
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据这篇文章 http://railsforum.com/viewtopic.php?id=40674您可能需要添加
gem 'sqlite3-ruby', :require => 'sqlite3'
到您的 Gemfile,
然后尝试运行
bundle package
和rake db:create
,最后运行rake db:migrate
according to this post http://railsforum.com/viewtopic.php?id=40674 you probably need to add
gem 'sqlite3-ruby', :require => 'sqlite3'
to your Gemfile,
and after that try to run
bundle package
andrake db:create
and finallyrake db:migrate