1

当我运行 bundle install 命令时,我必须运行一个现有项目。它挂了将近半个小时,仍然没有完成 bundle install 命令。我使用的是 ruby​​1.9.3p327,我的 rails 版本是 3.2.9和项目的gem文件

source 'https://rubygems.org'

gem 'rails', '3.2.8'
gem 'pg', '0.14.1'

gem 'compass', git: 'git://github.com/chriseppstein/compass.git'
gem 'sass-rails',   '~> 3.2.3'
gem 'jquery-rails', '~> 2.0.0'

gem 'devise', '~> 2.0.0'
gem 'bootstrap-sass', '2.1.1.0'
gem 'simple_form', '2.0.4'

#gem 'refinerycms', '2.0.8'
gem 'refinerycms-dashboard'
gem 'refinerycms-images'
gem 'refinerycms-pages'
gem 'refinerycms-resources'

gem 'refinerycms-bootstrap', git: 'git://github.com/ghoppe/refinerycms-bootstrap.git'
gem 'rest-client', '1.6.7', require: 'rest_client'
gem 'hashie', '1.2.0'

gem 'faye'
gem 'restforce'

# gems from old site's gemfile
gem 'databasedotcom' # we may get rid of this
gem 'databasedotcom-rails' # we may get rid of this
gem 'haml'
gem 'will_paginate'
gem 'httparty'

gem 'ruby-openid', :git => "git://github.com/mbleigh/ruby-openid.git"
gem 'openid_active_record_store'
gem 'omniauth-twitter'
gem 'omniauth-github'
gem 'omniauth-facebook'
gem 'omniauth-linkedin'
gem 'omniauth-openid'
gem 'omniauth-salesforce'
gem 'savon'

gem 'redis'
gem 'aws-s3', :require => 'aws/s3' # no longer needed?
gem 'thin'
gem 'resque', :git => 'http://github.com/hone/resque.git', :branch => 'keepalive', :require => 'resque/server'
gem "recaptcha", :require => "recaptcha/rails"
gem 'flash_messages_helper'
gem 'remote_syslog_logger'
gem 'dalli'
gem 'encryptor'
gem 'airbrake'

gem 'chosen-rails'
gem 'fog'

# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'coffee-rails', '~> 3.2.1'
  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby
  gem 'uglifier', '>= 1.0.3'
end

group :development, :test do
  gem 'annotate', '2.4.0'
  gem 'guard'
  gem 'guard-bundler'
  gem 'guard-rspec'
  gem 'spork'
  gem "guard-spork"
  gem 'growl'
  gem 'ruby-debug19'
  gem 'sqlite3'
  gem 'rspec-rails'
  gem 'sextant'
  gem 'quiet_assets'  
  gem 'vcr'
  gem 'rb-fsevent', '~> 0.9.1'
  gem 'sql-logging'
end

group :test do
  # Pretty printed test output
  gem 'turn', :require => false
  gem "minitest"
  gem "rake"
  gem 'webmock'
  gem "mocha"
end

并且它停留很长时间的线是

安装带有本机扩展的 linecache19 (0.5.12)

任何人都可以帮助如何安装这个项目?

4

2 回答 2

2

使用最新的 rubies 1.9+,一些 gem 喜欢ruby-debug并且linecache安装起来非常痛苦。但是,替代方案debugger通常debugger-linecache可以解决问题。

于 2012-12-28T16:43:08.373 回答
2

我发现它挂了很长时间的原因是由于某种原因它无法找到Ruby源(它在构建本机扩展时需要某些头文件),所以它再次下载它。由于包相当大,服务器速度很慢且负载很重,因此需要很长时间(30 分钟以上),并且由于没有反馈,整个事情似乎已经挂起。

如果您在执行此操作时使用 ^C 闯入,您可能会收到如下错误消息:

/home/xxxx/.rvm/rubies/ruby-1.9.3-p392/bin/ruby extconf.rb
checking for vm_core.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/home/xxxx/.rvm/rubies/ruby-1.9.3-p392/bin/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include
        --without-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
Downloading http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz

底部的两行是正在发生的事情的线索。

我认为您应该能够在“gem install”或“bundle config”上使用“--with-ruby-include”选项来强制它使用您已经拥有的源,但在我的(有限)测试中似乎没有用,一旦我意识到发生了什么,我就没有深入挖掘。

以下是一些提到这一点的链接 - 希望你会比我有更多的运气:

通过 rvm
https://github.com/mark-moseley/ruby-debug/wiki/Installation%3A-command-line-version为 Ruby 1.9.2 安装 linecache19

于 2013-03-21T15:30:21.317 回答