如果我在本地安装,Byebug Gem不会拣货

时间:2015-05-19 07:17:47

标签: ruby-on-rails ruby gem rubygems

我已从github下载了byebugcolumnize个宝石  我的宝石文件就像这样

source 'http://rubygems.org'   

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.0'
# Use mysql as the database for Active Record
gem 'mysql2'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby

# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# gem 'bcrypt-ruby', path:"/home/avnish/Documents/rails-workspace/bcrypt-ruby-master"
# gem 'responders', path:"/home/avnish/Documents/rails-workspace/responders-master"
# gem 'devise', path:"/home/avnish/Documents/rails-workspace/devise-master"
# gem 'orm_adapter', path:"/home/avnish/Documents/rails-workspace/orm_adapter-master"
# gem 'warden', path:"/home/avnish/Documents/rails-workspace/warden-master"
#gem 'formtastic'
gem 'therubyracer'
gem "less-rails" #Sprockets (what Rails 3.1 uses for its asset pipeline) supports LESS
gem 'devise'
gem 'byebug', path:"/home/avnish/Documents/rails-workspace/byebug-master"
gem 'columnize', path:"/home/avnish/Documents/rails-workspace/columnize-master"
#gem 'twitter-bootstrap-rails'

#gem 'bootstrap-sass', '~> 2.3.1.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Unicorn as the app server
# gem 'unicorn'

# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development

group :development, :test do
  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  #gem 'byebug', path:"/home/ravendra/Downloads/byebug-master"
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
  gem 'spring'
end

之后我运行bundle install --local这个命令,我们开始rails s它给了我们

/home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- byebug/byebug (LoadError)
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
    from /home/avnish/Documents/rails-workspace/byebug-master/lib/byebug/core.rb:1:in `<top (required)>'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `block in require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/activesupport-4.2.0/lib/active_support/dependencies.rb:274:in `require'
    from /home/avnish/Documents/rails-workspace/byebug-master/lib/byebug.rb:1:in `<top (required)>'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `each'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:72:in `block in require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `each'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler/runtime.rb:61:in `require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/bundler-1.9.9/lib/bundler.rb:134:in `require'
    from /home/avnish/Documents/rails-workspace/pi_form/config/application.rb:7:in `<top (required)>'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:82:in `require'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:82:in `preload'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:143:in `serve'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:131:in `block in run'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:125:in `loop'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application.rb:125:in `run'
    from /home/avnish/.rvm/gems/ruby-2.1.2/gems/spring-1.3.4/lib/spring/application/boot.rb:18:in `<top (required)>'
    from /home/avnish/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from /home/avnish/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    from -e:1:in `<main>'

请有人帮助我

1 个答案:

答案 0 :(得分:0)

Byebug带有一个C-extension,它需要它才能工作。

我会说bundle install --local不会编译本地扩展,因此您需要手动执行此操作。转到byebug的目录,运行

bundle
bundle exec rake compile

再试一次。