rake 数据库:种子问题
当我运行 rake db:seed 或 rake db:migrate 时,我在这里看到一个奇怪的问题:
user@ubuntu:~/Desktop/staging/config$ bundle show activeresource
/usr/lib/ruby/gems/1.8/gems/activeresource-3.0.3
user@ubuntu:~/Desktop/staging/config$ rake db:seed
(in /home/rohan/Desktop/staging)
Could not find activesupport-3.0.3 in any of the sources
Try running `bundle install`.
user@ubuntu:~/Desktop/staging/config$ ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
我不知道该怎么做。任何帮助将不胜感激。作为记录,我正在使用 RVM。
I'm seeing a weird issue here when I run rake db:seed or rake db:migrate:
user@ubuntu:~/Desktop/staging/config$ bundle show activeresource
/usr/lib/ruby/gems/1.8/gems/activeresource-3.0.3
user@ubuntu:~/Desktop/staging/config$ rake db:seed
(in /home/rohan/Desktop/staging)
Could not find activesupport-3.0.3 in any of the sources
Try running `bundle install`.
user@ubuntu:~/Desktop/staging/config$ ruby --version
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
I don't know what to do. Any help would be appreciated. For the record, I am using RVM.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
运行
捆绑安装
。这将解决问题。Run
bundle install
. This will fix the problem.您需要在 gemfile 中引入rails,然后运行bundle install。
现在运行
捆绑安装
you need to require rails in gemfile then run bundle install.
now run
bundle install
假设您尝试按照要求运行
bundle install
,您可能只需要使用:在捆绑包的上下文中运行
rake
。On the assumption that you tried running
bundle install
like it asked, you probably just need to use:to run
rake
in the context of the bundle.