耙资产:预编译

时间:2013-04-02 02:57:42

标签: mysql ruby-on-rails windows postgresql phpmyadmin

C:\Sites\dtr-payroll>rake assets:precompile
rake aborted!
You have already activated rake 10.0.4, but your Gemfile requires rake 10.0.3. Using bundle exec may solve this.
C:/Sites/dtr-payroll/config/boot.rb:6:in `<top (required)>'
C:/Sites/dtr-payroll/config/application.rb:1:in `<top (required)>'
C:/Sites/dtr-payroll/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

4 个答案:

答案 0 :(得分:19)

您应该先删除Gemfile.lock文件并再次删除bundle install,然后再使用

rake assets:precompile

这是因为你已经激活了rake 10.0.4,但在你的Gemfile.lock文件中它是rake 10.0.3所以要么你改了它,要么删除Gemfile.lock文件。

答案 1 :(得分:5)

通过

将您的佣金更新为10.0.4
bundle update rake

会解决它

答案 2 :(得分:2)

请尝试

  

捆绑exec rake资产:预编译

你应该首先谷歌

答案 3 :(得分:0)

您可以使用bundle exec rake资产:预编译 如果更新数据库迁移,则可以使用: bundle exec rake db:migrate