使用本机扩展安装linecache19(0.5.12)

时间:2012-12-28 14:53:48

标签: ruby-on-rails ruby-on-rails-3.2

当我运行bundle install command时,我必须运行一个现有的项目。它挂了大约半个小时仍然没有完成bundle install命令。我正在使用ruby1.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)

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

2 个答案:

答案 0 :(得分:2)

使用最新的红宝石1.9+,像ruby-debuglinecache这样的宝石会变得非常痛苦。但是,替代debuggerdebugger-linecache通常会解决问题。

答案 1 :(得分: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”选项来强制它使用你已有的源,但在我的(有限的)测试这些似乎不起作用,一旦我意识到发生了什么,我就没有挖得太远。

以下是一些提到这一点的链接 - 希望你能比我更幸运:

Installing linecache19 for Ruby 1.9.2 via rvm  
 https://github.com/mark-moseley/ruby-debug/wiki/Installation%3A-command-line-version