我删除了我的gemlock文件,然后运行了bundle install但是出现了这些错误
Bundler找不到gem" railties"
的兼容版本
Gemfile中的gem列表:
coffee-rails (~> 4.2) was resolved to 4.2.2, which depends on railties (>= 4.0.0)
jquery-rails (>= 4.3.1, ~> 4.3) was resolved to 4.3.1, which depends on railties (>= 4.2.0)
material-ui (~> 0.7.3.2) was resolved to 0.7.3.2, which depends on railties (~> 4.0)
rails (~> 5.1.2) was resolved to 5.1.2, which depends on railties (= 5.1.2)
sass-rails (~> 5.0) was resolved to 5.0.6, which depends on railties (< 6, >= 4.0.0)
web-console (>= 3.3.0) was resolved to 3.5.1, which depends on railties (>= 5.0)
我可以通过ruby -v
获得ruby版本但是甚至无法通过rails -v
获取我的rails版本。可能是什么问题?
答案 0 :(得分:0)
更新Gemfile
的rails条目:
- gem 'rails'
+ gem 'rails', '< 5.0'
您的Gemfile.lock
是在Rails5
时代之前创建的,因此开放式依赖很好。现在它已经解决了Rails5
,强制执行railties = 5.1.2
,其他所有宝石都没有准备好。