Ruby on rails Boot.rb中的Fedena错误

Ruby on rails Boot.rb中的Fedena错误,ruby-on-rails,ruby,fedena,Ruby On Rails,Ruby,Fedena,/home/palpandi/.rvm/gems/ruby-1.8.7-p374@fedena_zip/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:警告: Gem::Dependency#version_需求已弃用,将被删除 2010年8月或之后。使用要求 /home/palpandi/.rvm/gems/ruby-1.8.7-p374@fedena_zip/gems/activesupport-2.3.5/lib/active\u-supp

/home/palpandi/.rvm/gems/ruby-1.8.7-p374@fedena_zip/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:警告: Gem::Dependency#version_需求已弃用,将被删除 2010年8月或之后。使用要求

/home/palpandi/.rvm/gems/ruby-1.8.7-p374@fedena_zip/gems/activesupport-2.3.5/lib/active\u-support/dependencies.rb:105:in `缺少常量:未初始化的常量Rails::Boot::Bundler (名称错误)

使用Rails 2.3.5 Ruby 1.8.7
ubuntu 12.04

将这一行放在你的boot.rb中

begin
 require "rubygems"
 require "bundler"
rescue Bundler::GemNotFound 
   raise RuntimeError, "Bundler couldn't find some gems." + "Did you run bundle install?"
end

gem安装bundler

并在加入:

gem'bundler'


在config/boot.rb的第2行中(就在require'rubygems'之后)

我遇到了类似的问题。解决这个问题的正确方法是转到您的项目文件夹,然后在
config/boot.rb
中转到最底层,就在
Rails.boot之前行添加以下内容:

begin
 require "rubygems"
 require "bundler"
rescue Bundler::GemNotFound
   raise RuntimeError, "Bundler couldn't find some gems." + "Did you run bundle install?"
end

class Rails::Boot
  def run
    load_initializer

    Rails::Initializer.class_eval do
      def load_gems
        @bundler_loaded ||= Bundler.require :default, Rails.env
      end
    end

    Rails::Initializer.run(:set_load_path)
  end
end

这将解决“未初始化常量授权”错误。

sooo,您的schmubutu机器上是否安装了bundler?请使用本指南