gpt4 book ai didi

ruby-on-rails - 激活 Ruby RAKE 10.0.1,需要 10.0.0

转载 作者:行者123 更新时间:2023-12-03 18:10:49 24 4
gpt4 key购买 nike

当我尝试运行“rake test”时出现此错误:

avery@ubuntu:~/rails_projects/depot$ rake test
rake aborted!
You have already activated rake 10.0.1, but your Gemfile requires rake 10.0.0. Using bundle exec may solve this.
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:31:in `block in setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:17:in `setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler.rb:116:in `setup'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/setup.rb:7:in `<top (required)>'
/home/avery/rails_projects/depot/config/boot.rb:6:in `<top (required)>'
/home/avery/rails_projects/depot/config/application.rb:1:in `<top (required)>'
/home/avery/rails_projects/depot/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

当我尝试运行“bundle exec rake”时,我得到:
rake aborted!
Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes.
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs/runtimes.rb:51:in `autodetect'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs.rb:5:in `<module:ExecJS>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/execjs-1.4.0/lib/execjs.rb:4:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `each'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:66:in `block in require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `each'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler/runtime.rb:55:in `require'
/home/avery/.rvm/gems/ruby-1.9.3-p327/gems/bundler-1.2.2/lib/bundler.rb:128:in `require'
/home/avery/rails_projects/depot/config/application.rb:7:in `<top (required)>'
/home/avery/rails_projects/depot/Rakefile:5:in `require'
/home/avery/rails_projects/depot/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)

我怎样才能解决这个问题?

最佳答案

你可能有 rake 10.0.0在您的 Gemfile.lock .

删除 Gemfile.lock可能会解决问题。

关于ruby-on-rails - 激活 Ruby RAKE 10.0.1,需要 10.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13400587/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com