Bundle install not working after using gem update --system

3.7k views Asked by At

I am trying to pack gems in vendor folder,so when I used bundle install --path vendor, I got error as:

[root@localhost myapp]# bundle install --path vendor
Fetching source index for http://rubygems.org/
/usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler.rb:209: warning: Insecure world writable dir /home/developer in PATH, mode 040777
Using rake (10.1.0) 
Using multi_json (1.2.0) 
Using activesupport (3.1.10) 
Using builder (3.0.4) 
Using i18n (0.6.5) 
Using activemodel (3.1.10) 
Using erubis (2.7.0) 
Using rack (1.3.10) 
Using rack-cache (1.2) 
Using rack-mount (0.8.3) 
Using rack-test (0.6.2) 
Using hike (1.2.3) 
Using tilt (1.3.7) 
Using sprockets (2.0.4) 
Using actionpack (3.1.10) 
Using mime-types (1.25.1) 
Using polyglot (0.3.3) 
Using treetop (1.4.15) 
Using mail (2.3.3) 
Using actionmailer (3.1.10) 
Using arel (2.2.3) 
Using tzinfo (0.3.38) 
Using activerecord (3.1.10) 
Using activeresource (3.1.10) 
Using ansi (1.4.3) 
Using bcrypt-ruby (3.1.2) 
Using bundler (1.0.21) 
Using cocaine (0.3.2) 
Using coffee-script-source (1.6.3) 
Using execjs (2.0.2) 
Using coffee-script (2.2.0) 
Using rack-ssl (1.3.3) 
Using json (1.8.1) 
Using rdoc (3.12.2) 
Using thor (0.14.6) 
Using railties (3.1.10) 
Using coffee-rails (3.1.1) 
Using orm_adapter (0.0.7) 
Using warden (1.2.1) 
Using devise (1.5.2) 
Using jquery-rails (1.0.19) 
Installing libv8 (3.16.14.3) with native extensions 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb 
creating Makefile
/mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/builder.rb:87: warning: Insecure world writable dir /home/developer in PATH, mode 040777
ln: creating symbolic link `build/gyp': Operation not supported
Compiling v8 for ia32
Using python 2.6.5
Using compiler: /usr/bin/g++
/bin/sh: build/gyp/gyp: No such file or directory
gmake: *** [out/Makefile.ia32] Error 127
/mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
    from /mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `each'
    from /mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:35:in `verify_installation!'
    from /mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/location.rb:26:in `install!'
    from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
    build/gyp/gyp --generator-output="out" build/all.gyp \
                  -Ibuild/standalone.gypi --depth=. \
                  -Dv8_target_arch=ia32 \
                  -S.ia32  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3


Gem files will remain installed in /mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3 for inspection.
Results logged to /mnt/hgfs/myapp/vendor/ruby/1.9.1/gems/libv8-3.16.14.3/ext/libv8/gem_make.out

for gem libv8. So after googling I used following commands:-

git clone git://github.com/cowboyd/libv8.git
 cd libv8
 bundle install

After that that error went away but came a new error for rake-compiler as:-

[root@localhost libv8]# bundle install
/mnt/hgfs/myapp/libv8/libv8.gemspec:19: warning: Insecure world writable dir /home/developer in PATH, mode 040777
fatal: git ls-files: cannot generate relative filenames containing '..'
fatal: git ls-files: cannot generate relative filenames containing '..'
fatal: git ls-files: cannot generate relative filenames containing '..'
fatal: git ls-files: cannot generate relative filenames containing '..'
Fetching source index for https://rubygems.org/
Using rake (10.1.0) 
Installing addressable (2.3.5) 
Installing diff-lcs (1.2.5) 
Installing excon (0.25.3) 
Installing heroku-api (0.3.15) 
Installing launchy (2.4.2) 
Installing netrc (0.7.7) 
Installing mime-types (2.0) 
Installing rest-client (1.6.7) 
Installing rubyzip (1.1.0) 
Installing heroku (2.41.0) 
Using libv8 (3.16.14.3) from source at /mnt/hgfs/myapp/libv8 
Installing multipart-post (1.2.0) 
Installing rake-compiler (0.9.2) 
Gem::InstallError: rake-compiler requires RubyGems version >= 1.8.25. Try 'gem update --system' to update RubyGems itself.
An error occured while installing rake-compiler (0.9.2), and Bundler cannot continue.
Make sure that `gem install rake-compiler -v '0.9.2'` succeeds before bundling.

, so when I tried: gem install rake-compiler, I got error as:

ERROR:  Error installing rake-compiler:
    rake-compiler requires RubyGems version >= 1.8.25. Try 'gem update --system' to update RubyGems itself.

So I did gem update --system

And after that did gem install rake-compiler. Now when I am trying bundle install --path vendor, I am getting an unseen error as:

[root@localhost myapp]# bundle install --path vendor
Fetching source index for http://rubygems.org/
/usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:253:in `fetch_all_remote_specs': undefined method `list' for #<Gem::SpecFetcher:0x9ce46f0> (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:234:in `block in remote_specs'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:231:in `remote_specs'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:165:in `fetch_specs'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/source.rb:70:in `specs'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:159:in `block (2 levels) in index'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:158:in `each'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:158:in `block in index'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/index.rb:7:in `build'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:157:in `index'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:151:in `resolve'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:90:in `specs'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/definition.rb:85:in `resolve_remotely!'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/installer.rb:43:in `run'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/installer.rb:8:in `install'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/cli.rb:219:in `install'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor.rb:263:in `dispatch'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/lib/bundler/vendor/thor/base.rb:386:in `start'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.0.21/bin/bundle:13:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/bin/bundle:19:in `load'
    from /usr/local/rvm/gems/ruby-1.9.2-p290@global/bin/bundle:19:in `<main>'

Please help me, as I think I have created some serious problem?? I just want to pack my gems in vendor/ folder....?? Please tell me where I went wrong.

Output of gem env:

[root@localhost myapp]# gem env
/usr/local/rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/commands/environment_command.rb:148: warning: Insecure world writable dir /home/developer in PATH, mode 040777
RubyGems Environment:
  - RUBYGEMS VERSION: 2.1.11
  - RUBY VERSION: 1.9.2 (2011-07-09 patchlevel 290) [i686-linux]
  - INSTALLATION DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290@curse
  - RUBY EXECUTABLE: /usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/rvm/gems/ruby-1.9.2-p290@curse/bin
  - SPEC CACHE DIRECTORY: /root/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /usr/local/rvm/gems/ruby-1.9.2-p290@curse
     - /usr/local/rvm/gems/ruby-1.9.2-p290@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/rvm/gems/ruby-1.9.2-p290@curse/bin
     - /usr/local/rvm/gems/ruby-1.9.2-p290@global/bin
     - /usr/local/rvm/rubies/ruby-1.9.2-p290/bin
     - /usr/local/rvm/bin
     - /usr/lib/qt-3.3/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/local/sbin
     - /usr/sbin
     - /sbin
     - /home/developer/bin
0

There are 0 answers