我正在使用Ubuntu 14.04而且我是使用Ruby on Rails的初学者
我最近按照教程安装了rbenv,ruby 2.3.0和rails 4.2.4:https://gorails.com/setup/ubuntu/14.04
安装完成后,我运行了ruby -v和rails -v并获得了预期的版本。到现在为止还挺好。然后我跑了((TryDefinition) from("direct:yo").doTry()
.choice()
.when(header("s").isEqualTo(1))
.log(LoggingLevel.WARN, "normal")
.end())
.doCatch(Exception.class)
.log(LoggingLevel.WARN, "exception")
.endDoTry();
我得到了:
rails s
要修复它,我跑了:
{2}这个StackOverflow问题rails server bin/rails:6: warning: already initialized constant APP_PATH error
导致了一个新的错误(我也删除了Spring gem):
rake rails:update:bin
我在前面添加'bundle exec'并收到以下错误:
Gem::LoadError: You have already activated rake 10.4.2, but your Gemfile requires rake 10.5.0. Prepending `bundle exec` to your command may solve this.
/my-home-directory/my-ruby-on-rails-project/config/boot.rb:3:in `<top (required)>'
/my-home-directory/my-ruby-on-rails-project/config/application.rb:1:in `<top (required)>'
/my-home-directory/my-ruby-on-rails-project/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- bundler/setup
/my-home-directory/my-ruby-on-rails-project/config/boot.rb:3:in `<top (required)>'
/my-home-directory/my-ruby-on-rails-project/config/application.rb:1:in `<top (required)>'
/my-home-directory/my-ruby-on-rails-project/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
在安装rbenv之前,我使用的是RVM,我遇到了同样的错误。当我开始遇到这些问题时,我无法弄清楚我做了哪些改变。
为了我的理智,非常感谢任何帮助!
谢谢大家!
答案 0 :(得分:3)
我的一位朋友帮我解决了这个问题。 他的建议是什么:
像魅力一样工作。 我问他为什么认为我有这些问题并说:很难说,搞乱的.bundle目录可以做很多时髦的事情。