Rake 在供应商/宝石中找不到宝石
我正在尝试发布 Rails 3.1(从 3.0 升级)应用程序。提交代码后我运行
bundle install --path vendor/gems RAILS_ENV=production
它有效。我有一个目录 vendor/gems/ruby/1.9.1
,其中 bin
、cache
、doc
、宝石
和规格
位于。但是,当我运行 rake 任务时,出现错误:
$ rake db:migrate RAILS_ENV=production
Could not find authlogic-3.0.3 in any of the sources
Run `bundle install` to install missing gems.
这不是 authlogic
的问题,它都在 gems
和 specifications
目录中,在我从 gemfile 中删除它之前,错误中提到了它的 annotate
。
有什么问题吗?
我使用的是 Ubuntu 10.10、Ruby 1.9.2p0、Rails 3.1 和 Rake 0.9.2。代码由 capistrano 部署,vendor
目录放置在 shared
文件夹中并链接到版本中。
I'm trying to publish a Rails 3.1 (upgraded from 3.0) application. After submitting the code I ran
bundle install --path vendor/gems RAILS_ENV=production
It worked. I've got a directory vendor/gems/ruby/1.9.1
, in which bin
, cache
, doc
, gems
and specifications
are located. However, when I run a rake task I've got an error:
$ rake db:migrate RAILS_ENV=production
Could not find authlogic-3.0.3 in any of the sources
Run `bundle install` to install missing gems.
It's not a problem with authlogic
, it's both in gems
and specifications
directories, and it was annotate
mentioned in the error before I removed it from the gemfile.
What can be wrong?
I'm using Ubuntu 10.10, Ruby 1.9.2p0, Rails 3.1 and Rake 0.9.2. The code was deployed by capistrano, vendor
directory is placed in shared
folder and linked in the releases.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想使用项目的 gem,那么您应该使用
bundle exec
命令,例如,还需要在 gem 文件中包含 authlogic gem。
首先从vendor/文件夹中删除整个gems目录。您应该使用这个:
不需要指定环境。
If you want to use the project's gems then you should use
bundle exec
command e.g.,also require authlogic gem in gem file.
First delete the whole gems directory from vendor/ folder. You should use this:
no needs for specifying the environment.