有没有人知道为什么bundler会抛出这个错误。
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/source/rubygems.rb:158:in `normalize_uri': The source must be an absolute URI (ArgumentError)
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/source/rubygems.rb:129:in `add_remote'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/dsl.rb:121:in `source'
/home/arrc/arrC/rails/Gemfile:1:in `eval_gemfile'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/dsl.rb:30:in `instance_eval'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/dsl.rb:30:in `eval_gemfile'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/dsl.rb:9:in `evaluate'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/definition.rb:26:in `build'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler.rb:152:in `definition'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/cli.rb:255:in `install'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/vendor/thor/command.rb:27:in `run'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_command'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/vendor/thor.rb:363:in `dispatch'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/vendor/thor/base.rb:438:in `start'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/cli.rb:10:in `start'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/bin/bundle:22:in `block in <main>'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
/home/arrc/.rvm/gems/ruby-2.1.0@global/gems/bundler-1.5.0/bin/bundle:22:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.
我认为这个错误是特定于版本的所以我卸载了捆绑包1.5.0但我在版本1.3.5(捆绑包)中仍然遇到同样的错误。
标准导轨4.0.2生成 Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.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', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
答案 0 :(得分:0)
尝试删除第一行Gemfile中的缩进,否则在Bundler github存储库中创建一个问题。