Ruby on rails 如何修复ruby bundle安装错误?

Ruby on rails 如何修复ruby bundle安装错误?,ruby-on-rails,ruby,bundler,Ruby On Rails,Ruby,Bundler,每次我试图在这个RoR目录的本地副本中运行bundle install,我都会收到一个错误。我已经用ruby 2.1.2和2.2.2安装了rvm,还安装了rails。我是通过vagrant运行的,Ubuntu14.04,内存为1gb,但我不认为这有什么关系?我似乎找不到错误指向的丢失文件 更新:这是文件 source 'https://rubygems.org' ruby '2.2.2' gem 'rails', '~> 4.1.6' #gem 'catarse_api', p

每次我试图在这个RoR目录的本地副本中运行
bundle install
,我都会收到一个错误。我已经用ruby 2.1.2和2.2.2安装了rvm,还安装了rails。我是通过vagrant运行的,Ubuntu14.04,内存为1gb,但我不认为这有什么关系?我似乎找不到错误指向的丢失文件

更新:这是文件

   source 'https://rubygems.org'

ruby '2.2.2'

gem 'rails', '~> 4.1.6'

#gem 'catarse_api', path: '~/code/catarse_api'
gem 'catarse_api', github: 'catarse/catarse_api'
gem 'protected_attributes'
gem 'rails-observers'

gem 'sidekiq',  '~> 3.1.3'

# Turns every field on a editable one
gem "best_in_place", :git => "git://github.com/bernat/best_in_place", ref: "ee95961e639022e6aa528704b8cb4789596ea61b"

# State machine for attributes on models
gem 'state_machine', require: 'state_machine/core'

# Database and data related
gem 'pg', '0.17.1'
gem 'dbhero', '>= 1.1.6'
gem 'postgres-copy'
gem 'pg_search'
gem 'i18n_alchemy'

gem 'schema_plus'
gem 'chartkick'
gem 'catarse_settings_db', '>= 0.1.0'

# Notifications
gem 'user_notifier', '~> 0.0.5'

# Mixpanel for backend tracking
gem 'mixpanel-ruby'
gem 'mixpanel_client'

# Payment engines
gem 'catarse_moip', '~> 3.2.0'
gem 'catarse_pagarme', '2.6.8'
#gem 'catarse_pagarme', path: '../catarse_pagarme'

# Decorators
gem 'draper'

# Frontend stuff
gem 'slim-rails'
gem 'jquery-rails'
gem 'browser'
gem "cocoon"

# Static pages
gem 'high_voltage'

# Authentication and Authorization
gem 'omniauth'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'devise'
gem 'ezcrypto'
gem 'pundit'

# Email marketing
gem 'catarse_monkeymail', '>= 0.1.6'

# HTML manipulation and formatting
gem 'simple_form'
gem 'mail_form'
gem "auto_html"
gem 'kaminari'
gem 'redactor-rails', github: 'catarse/redactor-rails'

# Uploads
gem 'carrierwave', '~> 0.10.0'
gem "mini_magick"

# Other Tools
gem 'to_xls'
gem 'ranked-model'
gem 'feedjira'
gem 'inherited_resources'
gem 'has_scope', '>= 0.6.0.rc'
gem 'spectator-validates_email',  require: 'validates_email'
gem 'video_info', '>= 1.1.1'
gem 'httparty', '~> 0.6.1' # this version is required by moip gem, otherwise payment confirmation will break

# Translations
gem 'http_accept_language'
gem 'routing-filter', '~> 0.4.0.pre'

# Payment
gem 'moip', github: 'catarse/moip-ruby', ref: 'c0225ad71645cd1df35dafa1e45c9f092b3abb9e'
gem 'httpclient',     '>= 2.2.5'

group :production do
  # Gem used to handle image uploading
  gem 'fog', '>= 1.3.1'

  # Workers, forks and all that jazz
  gem 'unicorn'

  # Enabling Gzip on Heroku
  # If you don't use Heroku, please comment the line below.
  gem 'heroku-deflater', '>= 0.4.1'

  # Make heroku serve static assets and loggin with stdout
  #gem 'rails_on_heroku'
  gem 'rails_12factor'

  # Monitoring with the new new relic
  gem 'newrelic_rpm'

  # Using dalli and memcachier have not presented significative performance gains
  # Probably this is due to our pattern of cache usage
  # + the lack of concurrent procs in our deploy
  #gem 'memcachier'
  #gem 'dalli'
end
group :development do
  gem "letter_opener"
  gem 'foreman'
  gem 'better_errors'
  gem 'binding_of_caller'
  gem 'thin'
  # Uncomment only for optimization, should be commented on master branch
  # gem 'rack-mini-profiler'
  # gem 'ruby-prof'
end

group :test, :development do
  gem 'rspec-rails', '~> 3.1'
  gem 'rspec-mocks'
  gem 'rspec-its'
  gem 'rspec-collection_matchers'
  gem 'pry'
  gem 'jasmine-rails'
end

group :test do
  gem 'zonebie'
  gem 'fakeweb'
  gem 'poltergeist'
  gem 'launchy'
  gem 'database_cleaner'
  gem 'shoulda'
  gem 'factory_girl_rails'
  gem 'capybara',   '~> 2.2.0'
  gem 'selenium-webdriver'
end

gem 'sass-rails'
gem 'coffee-rails'
gem 'compass-rails'
gem 'uglifier'
gem 'compass-960-plugin'
gem 'sprockets'

# FIXME: Not-anymore-on-development
# Gems that are with 1 or more years on the vacuum
gem 'weekdays'
ps:请指出我应该提供的任何相关信息,以帮助确定原因


显然bundler存在一个问题,以下是我的解决方法:

  • 通过运行
    gem cleanup bundler进行清理
  • 通过
    gem安装bundler重新安装bundler

谷歌是你的朋友:。他没有使用rails 4.2。尝试安装bundler?gem install bundler?@osman如果您阅读了该线程,它似乎是gem_路径的问题,这可能与Rails有关,也可能与Rails无关,但似乎在这种情况下适用。此外,OP还标记了RoR问题,并指出安装了Rails。虽然他没有指定版本,但根据具体的错误消息,我敢打赌他确实在4.2上。@osman Rails 4.2已经安装,我只是检查了一下。并安装了捆绑机。另一方面,我认为它会输出一条不同的消息,说bundle找不到?@MarsAtomic我已经添加了我的gemfile,并检查了你发布的链接,但我仍然无法解决这个问题。知道我该怎么办吗?