使用 RoR 应用程序创建数据库时出错
我在运行 rake db:create
时收到此错误消息
Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
对于我应该做什么有什么想法吗?
I get this error message when running rake db:create
Could not find gem 'sqlite3 (>= 0, runtime)' in any of the gem sources listed in your Gemfile.
Any ideas on what I should do?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 Rails 应用程序的根目录打开
Gemfile
添加此行
gem ' sqlite3-ruby', :require =>; 'sqlite3'
运行
捆绑安装
运行
rake db:create
< /p>Open
Gemfile
from the root of your Rails applicationAdd this line
gem 'sqlite3-ruby', :require => 'sqlite3'
run
bundle install
run
rake db:create
我对 Rails 开发完全陌生,但这周我遇到了同样的问题。最终,我替换了行
gem 'sqlite-ruby, :require =>; 'sqlite3'
与gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
(在 Gemfile 中)我必须这样做,因为我运行的是 Mac OS 10.5.8 而不是 10.6
也许这会有所帮助。
I'm totally new to Rails development, but I had this same problem this week. Eventually, I replaced the line
gem 'sqlite-ruby, :require => 'sqlite3'
withgem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
(in the Gemfile)I had to do this because I'm running Mac OS 10.5.8 rather than 10.6
Maybe that will help.