简体   繁体   中英

Rake assets:precompile

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)

you should first delete your Gemfile.lock file and bundle install again and then use

rake assets:precompile

this is because you have activated rake 10.0.4 but in your Gemfile.lock file it is rake 10.0.3 so either you changed it or delete Gemfile.lock file.

Update your rake to 10.0.4 via

bundle update rake

that would fix it

please try

bundle exec rake assets:precompile

you should google it first

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM