Rails 和 SQLITE3 问题

发布于 2024-12-04 20:02:09 字数 583 浏览 4 评论 0原文

我正在尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

余罪 2024-12-11 20:02:09

根据这篇文章 http://railsforum.com/viewtopic.php?id=40674您可能需要添加

gem 'sqlite3-ruby', :require => 'sqlite3'
到您的 Gemfile,

然后尝试运行 bundle packagerake 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 and rake db:create and finally rake db:migrate

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文