我努力开始使用rails,所以对于成为n00b道歉。我现在已经多次安装和卸载了Ruby和我的所有宝石,但仍然无法启动rails。如果我这样做......
$ rails new sample_app
...
$ cd sample_app
...
$ bundle install
...
$ rails s
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
$ gem install rake -v 10.5.0
Successfully installed rake-10.5.0
Parsing documentation for rake-10.5.0
Installing ri documentation for rake-10.5.0
Done installing documentation for rake after 0 seconds
1 gem installed
$ rails s
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
$ rails --version
Could not find rake-10.5.0 in any of the sources
Run `bundle install` to install missing gems.
当我gem list
时,我看到安装了rake 10.5。我正在运行使用rbenv安装的Ruby 2.3.0。正在运行bundle install
或bundle update
表示无效。建议?
答案 0 :(得分:0)
之前我遇到过这个错误,有时候需要把
gem'rake'到Gemfile,然后运行捆绑安装。
答案 1 :(得分:0)
尝试运行
sudo apt-get update
sudo apt-get install rake