耙资产:预编译

Kir*_*548 7 mysql windows postgresql ruby-on-rails 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)
Run Code Online (Sandbox Code Playgroud)

sk1*_*712 19

你应该先删除你的Gemfile.lock文件bundle install,然后再使用

rake assets:precompile
Run Code Online (Sandbox Code Playgroud)

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

  • 除此之外,如果您不想删除`Gemfile.lock`文件,您应该能够运行`bundle update rake`来更新应用程序使用的rake版本. (4认同)

Nic*_*nto 5

通过将您的佣金更新为10.0.4

bundle update rake
Run Code Online (Sandbox Code Playgroud)

这会解决它