ruby on rails 异常

来源:互联网 发布:淘宝摄影师一天多少钱 编辑:程序博客网 时间:2024/06/06 08:44

执行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打开界面出现:

undefined method `environment' for nil:NilClass when importing Bootstrap into rails

up vote17down votefavorite
5

Getting error:

undefined method `environment' for nil:NilClassExtracted 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重启服务器即可

0 0
原创粉丝点击