ruby on rails 異常

執行rails時出現

Bundler could not find compatible versions for gem "activesupport":

In snapshot (Gemfile.lock):
    activesupport (4.0.4)


  In Gemfile:
    rails (= 4.0.3) ruby depends on
      activesupport (= 4.0.3) ruby


Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

意思是我的Gemfile文件和Gemfile.lock文件中版本衝突,先執行bundle update再執行bundle install就可以了。。。


2打開界面出現:

Getting error:

undefined method `environment' for nil:NilClass
Extracted source (around line #5):

<head>
  <title>Dossiyadata</title>
  <%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" => true %>
  <%= javascript_include_tag "application", "data-turbolinks-track" => true %>
  <%= csrf_meta_tags %>
</head>
。。。這是rails '4.0.3' 升級到"4.0.4'出現的,解決方法是將Gemfile中gem "sass-rails"版本更改爲 "~> 4.0.2" 然後執行bundle install重啓服務器即可

發佈了26 篇原創文章 · 獲贊 3 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章