2

Rails 3.1 (3.0 からアップグレード) アプリケーションを公開しようとしています。私が実行したコードを送信した後

bundle install --path vendor/gems RAILS_ENV=production

出来た。、、、およびが配置vendor/gems/ruby/1.9.1されているディレクトリがあります。ただし、rake タスクを実行するとエラーが発生します。bincachedocgemsspecifications

$ 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の両方にあり、gemfile から削除する前にエラーで言及されていました。gemsspecificationsannotate

何が間違っている可能性がありますか?

Ubuntu 10.10、Ruby 1.9.2p0、Rails 3.1、Rake 0.9.2 を使用しています。コードは capistrano によってデプロイされ、vendorディレクトリはsharedフォルダーに配置され、リリースにリンクされます。

4

1 に答える 1

3

If you want to use the project's gems then you should use bundle exec command e.g.,

bundle exec rake db:create

also require authlogic gem in gem file.

gem 'authlogic'

First delete the whole gems directory from vendor/ folder. You should use this:

bundle install --path=vendor/gems

no needs for specifying the environment.

于 2011-09-14T11:09:11.363 に答える