Giter Club home page Giter Club logo

rubygems-bundler's Introduction

Tests GPG signature check OpenCollective OpenCollective

What's RVM

RVM is the acronym of Ruby enVironment Manager. It manages Ruby application environments and enables switching between them.

Homepage and more info at https://rvm.io

Table of Contents

Installing RVM

Ubuntu

RVM have dedicated Ubuntu package, so please follow instructions posted here: https://github.com/rvm/ubuntu_rvm

If you need a different (newer) version of RVM, after installing base version of RVM check the Upgrading section below.

Any other operating system

Make sure you have following required packages installed:

  • curl
  • gpg2

And then run:

\curl -sSL https://get.rvm.io | bash -s stable

Additional installation options

Additional installation options and details about the installation process are described here: https://rvm.io/rvm/install

Upgrading RVM

You can upgrade RVM any time by running:

rvm get VERSION

Where VERSION should be replaced by one of the following values:

  • stable - latest stable RVM (good for servers)
  • master - latest RVM (might not be stable)
  • branch /path/branch - branched version of RVM (for testing new features or bug fixes)

Additional upgrading options are described here: https://rvm.io/rvm/upgrading

Basic RVM usage

Basic RVM usage scenarios include installing and switching between different ruby versions.

Installing ruby

To install ruby you have to call rvm install INTERPRETER[-VERSION] OPTIONS

When no version specified, RVM will install latest stable version or selected interpreter. If you omit to specify interpreter, RVM will assume that you wanted to install MRI ruby. Following examples would have exactly the same effect:

rvm install ruby-2.3.1
rvm install ruby-2.3
rvm install 2.3.1
rvm install 2.3

Passing additional --default option makes selected ruby your default.

We currently supported following ruby interpreters:

  • ruby - MRI ruby (The Gold Standard)
  • ironruby - a .NET ruby
  • jruby - Java implementation of the ruby
  • macruby - implementation of ruby 1.9 directly on top of macOS core technologies
  • maglev - 64-bit implementation on top of VMware's GemStone
  • mruby - lightweight ruby
  • opal - ruby to JavaScript compiler
  • rbx - Rubinius - a next generation virtual machine VM for ruby
  • topaz - high performance ruby, written in RPython
  • truffleruby - high performance ruby using GraalVM

Historical interpreters which you can still install with RVM, but are not anymore developed and supported by their authors:

  • ree - Ruby Enterprise Edition - MRI Ruby with several custom patches for performance, stability, and memory

Switching between ruby versions

To switch between ruby versions you should call

rvm use INTERPRETER[-VERSION]

Same rules and options apply as for install command with two special interpreters.

  • default - default ruby (or the system ruby if a default hasn't been set)
  • system - system ruby (state before RVM was installed)

Additionally you might want to list your preferred ruby version in a .ruby-version file stored in your project folder. This would cause automatic switch to selected ruby whenever you enter the folder.

Other RVM commands

RVM comes bundled with many different tools for managing your ruby environment. More detailed information about every command listed below can be read after executing rvm help COMMAND or browsing documentation on RVM homepage https://rvm.io.

Reporting issues

Here at RVM we get a high amount of bug reports, and often they are connected with specific environment settings which might be hard for us to replicate. That's why we would kindly ask you to follow the steps below so we can maximize our time helping you and minimize the time requesting more information.

Check documentation

We know, you hear this over and over and be rest assured we are working hard to improve the usability of https://rvm.io but we must always ask that you first please check the documentation if you are requesting a feature or if you are not sure if you did it right.

Try again with latest RVM

We try to release a new RVM as soon as we feel that we achieved certain stability. This might take a while and it could be the case that your issue has been already resolved in our development branch. Please get the latest RVM and try again:

rvm get master

File an issue

If the documentation is not clear, an error message is not clear or you are stuck with the problem, please do file a bug.

When in doubt as to whether your issue might relate to another, simply file a new bug, and we will mark it as duplicate if it needs to be. It's always better to file a new ticket and let us sort it out than to accidentally add noise to another ticket.

For filing issues, we have prepared a template for you to use. Please try to fill all sections as best as you can. Always make sure to split up each command and its output into its own fenced code block. If the output is long, please put it in a separate gist. Otherwise it's hard for us to process all the information and respond quickly.

Note that if there is a lot of debug or trace output you can redirect it to a file with the > character like rvm [command] > output.txt.

Contributing

You are very warmly welcome to help. Please follow our contribution guidelines

Any and all contributions offered in any form, past present or future are understood to be in complete agreement and acceptance with our Apache License v2.0.

Backers

Become a backer and support us with a small monthly donation to help us continue our activities. Thank you if you are already one of them! 🙏

Backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

Sponsors

License

Copyright (C) Michal Papis (2011-2021), Piotr Kuczynski (2016-2021), Wayne E. Seguin (2009-2011)

Licensed under the Apache License, Version 2.0

rubygems-bundler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rubygems-bundler's Issues

Doesn't work with thin

Hi,

it seems that thin doesn't like the way that rubygems-bundler handles ARGV. I've put a puts ARGV.inspect at the first start of bin/bundler_wrapper:

{{{
% thin -R faye.ru -C config/faye/development.yml start
["/home/nono/.rvm/gems/ruby-head-patched/bin/thin", "-R", "faye.ru", "-C", "config/faye/development.yml", "start"]
Starting server on tmp/sockets/development.faye.0.sock ...
["start", "--chdir=/home/nono/af83/project", "--environment=development", "--timeout=60", "--log=log/faye.0.log", "--pid=tmp/pids/faye.0.pid", "--max-conns=1024", "--max-persistent-conns=512", "--require=rubygems", "--rackup=faye.ru", "--socket=tmp/sockets/development.faye.0.sock", "--daemonize"]
/home/nono/.rvm/gems/ruby-head-patched/bin/bundler_wrapper:23:in read': No such file or directory - start (Errno::ENOENT) from /home/nono/.rvm/gems/ruby-head-patched/bin/bundler_wrapper:23:in

'
}}}

When installing gems via bundler, they have an incorrect shebang

My environment:

  • OS X Lion
  • rvm-managed ruby 1.9.2-p290

From a clean install w/o gems in the current rvm gemset:

$ gem install rubygems-bundler
$ gem install bundler
$ gem install rake

$ head -1 `which bundle`
#!/usr/bin/env bundler_wrapper
$ head -1 `which rake`
#!/usr/bin/env bundler_wrapper

$ echo -e "source 'http://rubygems.org'\ngem 'compass'" > Gemfile

$ bundle

$ head -1 `which sass`
#!/usr/bin/env ruby
$ head -1 `which compass`
#!/usr/bin/env ruby

ruby_noexec_wrapper should honor the program suffix.

The 'ruby_noexec_wrapper' needs to honor the --program-suffix passed into ./configure when building ruby.

You can get it from Gem. Here's an example for ruby compiled with --program-suffix=20

Gem.default_exec_format # => "%s20"

Otherwise, if this gem is installed for both (using the above example) ruby and ruby20 then all gem executables will try to run the ruby_noexec_wrapper for whichever ruby is first in the path.

Ciao!

Stub "foo" does not not work like `ruby -S foo`

[andre ✘ ~/sw/gems/bundler](1-2-stable⚡)$ ruby -S rspec spec/bundler/psyched_yaml_spec.rb
Run options:
  include {:focused=>true}
  exclude {:ruby=>"1.8", :realworld=>true, :sudo=>true}

All examples were filtered out; ignoring {:focused=>true}
.

Finished in 0.53782 seconds
1 example, 0 failures
[andre ✘ ~/sw/gems/bundler](1-2-stable⚡)$ rspec spec/bundler/psyched_yaml_spec.rb
/Users/andre/sw/gems/bundler/spec/bundler/psyched_yaml_spec.rb:3:in `<top (required)>': uninitialized constant Bundler::YamlSyntaxError (NameError)
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `block in load_spec_files'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `map'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in `load_spec_files'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in `run'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in `run'
        from /Users/andre/.rvm/gems/ruby-2.0.0-preview1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'

rubygems-bundler not allowing gems in 'global' to be executed, even if they don't exist in Gemfile

@mpapis

I can't use gems when I'm in a project, that exist in global. they positively HAVE to be in the Gemfile, or I can't use them. Is that supposed to happen? (Blocking global gems if they're NOT in the Gemfile?)

I thought it was supposed just cause limitation of use to the version of gems listed in Gemfile.lock, not block those not listed all together. https://gist.github.com/2338630 - I have github gem in 1.9.3-p125@global gemset. Its NOT listed in the project's Gemfile. I should be able to run that gem from the commandline without rubygems-bundler blocking its use since its NOT in the Gemfile.

e.g but it SHOULD be selecting the version of tzinfo i DO have in the Gemfile.lock (i have 2 versions of tzinfo installed,
the older one is in the Gemfile.lock) and that it does do correctly.

So basically, in cucumber feature format:

Given a gem is not in a project's Gemfile
And the gem is in the global gemset
Then rubygems-bundler should not attempt to execute it within the project's context
And rubygems-bundler should not block its command-line use

Fail when version of target gem is not satisfied

Currently, if the version specified in the Gemfile for the target gem is not installed, then noexec gives up and allows Ruby to select the default version. IMHO, this defeats the whole purpose of using bundle exec. It should fail fast (or make a setting to determine whether it does or not).

To reproduce, install a gem. Then, create a Gemfile that specifies it as a requirement.

gem "sass", "3.1.21"

Then, get it installed.

bundle install

Next, change the version to something different.

gem "sass", "3.1.20"

Finally, run the binary and consult the version.

sass --version

You'll see that it reports "3.1.21" instead of failing to execute.

Turning on debug, you'll see that noexec wasn't happy with what was going on:

$ NOEXEC_DEBUG=1 sass --version
Noexec - starting check
Examining /home/dallen/tmp/foo/Gemfile
Considering "/home/dallen/tmp/foo/.noexec.yaml"
Ignoring candidate /home/dallen/tmp/foo/Gemfile:
Could not find gem 'sass (= 3.1.20) ruby' in the gems available on this machine.
No valid Gemfile found, moving on
Sass 3.1.21 (Brainy Betty)

I think this should be a failure scenario.

Error while updating rubygems-bundler to 0.2.2

$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
$ gem -v
1.8.5
$ gem update
Updating installed gems
Updating rubygems-bundler
Building native extensions. This could take a while...
ERROR: Error installing rubygems-bundler:
ERROR: Failed to build gem native extension.

    /usr/bin/ruby1.9.1 extconf.rb

extconf.rb:15:in join': can't convert nil into String (TypeError) from extconf.rb:15:in

'

Broken with ruby 2.0

$ NOEXEC_DEBUG=1 rails c
Noexec - starting check
Examining /home/whitequark/amplifr/Gemfile
Considering "/home/whitequark/amplifr/.noexec.yaml"
Using config file at /home/whitequark/amplifr/.noexec.yaml
/home/whitequark/.gem/ruby/2.0.0/gems/rubygems-bundler-1.1.0/lib/rubygems-bundler/noexec.rb:44:in `candidate?': uninitialized constant Noexec::YAML (NameError)
        from /home/whitequark/.gem/ruby/2.0.0/gems/rubygems-bundler-1.1.0/lib/rubygems-bundler/noexec.rb:74:in `setup'
        from /home/whitequark/.gem/ruby/2.0.0/gems/rubygems-bundler-1.1.0/lib/rubygems-bundler/noexec.rb:89:in `<top (required)>'
        from /opt/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
        from /opt/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
        from /opt/rubies/ruby-2.0.0-p0/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
        from /home/whitequark/.gem/ruby/2.0.0/bin/ruby_noexec_wrapper:9:in `<main>'

skipping spork binary

Not sure why, but when i regenerated by binstubs, it skipped spork for me. Here is my gemfile:

https://gist.github.com/2421841

But it clearly does not generate a binstub for spork. Here's the output:

archive-tar-minitar 0.5.2
bundler 1.1.3
coderay 1.0.5
cucumber 1.1.9
cucumber 1.1.4
debugger 1.0.1
diff-lcs 1.1.3
erubis 2.7.0
fog 1.3.1
fog 1.1.2
git_remote_branch 0.3.3
haml 3.1.4
heroku 2.24.1
heroku 2.14.0
hirefireapp 0.0.5
hoe 1.5.3
httparty 0.8.1
km 1.1.1
launchy 2.1.0
launchy 2.0.5
newrelic_rpm 3.3.0
nokogiri 1.5.2
nokogiri 1.5.0
oauth 0.4.5
oink 0.9.3
parallel_tests 0.6.17
pry 0.9.8.2
rack 1.4.1
railties 3.2.3
railties 3.2.2
rake 0.9.2
rdiscount 1.6.8
rdoc 3.12
resque 1.20.0
rest-client 1.6.7
rspec-core 2.7.1
ruby-graphviz 0.9.21
ruby-prof 0.10.8
rubyforge 2.0.4
rubygems-bundler 0.9.0
sass 3.1.15
sass 3.1.12
tddium 1.0.1
term-ansicolor 1.0.7
thin 1.3.1
thor 0.14.6
tilt 1.3.3
treetop 1.4.10
vanity 1.8.0
xray 1.1

Gem install fails when using the --env-shebang flag

This is related to issue #15. When using gem install --env-shebang, the process fails with:


ERROR:  While executing gem ... (NoMethodError)
    undefined method `opts' for #

The fix for this issue is:


--- /tmp/rubygems_bundler_installer.rb.old  2012-05-05 19:01:27.000000000 +0200
+++ /tmp/rubygems_bundler_installer.rb  2012-05-05 19:01:37.000000000 +0200
@@ -54,7 +54,7 @@
 
     if not ruby_name then
       "#!#{Gem.ruby}#{opts}"
-    elsif inst.opts then
+    elsif opts then
       "#!/bin/sh\n'exec' #{ruby_name.dump} '-x' \"$0\" \"$@\"\n#{shebang}"
     else
       @env_path ||= Gem::Installer::ENV_PATHS.find {|env_path| File.executable? env_path } 

Uninstall instructions for old versions of rubygems-bundler don't work

$ gem install pry
Error loading RubyGems plugin "/home/conrad/.rvm/gems/jruby-1.6.7@global/gems/rubygems-bundler-0.9.2/lib/rubygems_plugin.rb": 

Older rubygems-bundler found, please uninstall it with:

    GEM_HOME="/home/conrad/.rvm/gems/jruby-1.6.7@global/gems" gem uninstall -ax rubygems-bundler -v 1.0.3

 (RuntimeError)
Successfully installed pry-0.9.10-java
1 gem installed
$ GEM_HOME="/home/conrad/.rvm/gems/jruby-1.6.7@global/gems" gem uninstall -ax rubygems-bundler -v 1.0.3
Error loading RubyGems plugin "/home/conrad/.rvm/gems/jruby-1.6.7@global/gems/rubygems-bundler-0.9.2/lib/rubygems_plugin.rb": 

Older rubygems-bundler found, please uninstall it with:

    gem uninstall -ax rubygems-bundler -v 1.0.3

 (RuntimeError)
INFO:  gem "rubygems-bundler" is not installed

Do I have to run 'gem regenerate_binstubs' every time a new gem is installed?

Hi there,

I'm wondering if I'll have to run 'gem regenerate_binstubs' every time a new gem is installed...it seems so, although I don't like the idea very much :)

Here's a recipe if you want to see what I mean. On bash, run:

rvm --create 1.9.2@rubygems-bundler_test
mkdir ~/rubygems-bundler_test
cd ~/rubygems-bundler_test
gem instal rubygems-bundler
echo -e "custom_shebang: $env ruby_bundler_wrapper" > ~/.gemrc
gem install bundler
gem regenerate_binstubs
gem install haml
echo -e "source 'http://rubygems.org'\ngem 'haml', '3.0.0'" >> Gemfile
bundle
USE_BUNDLER=no haml -v
USE_BUNDLER=try haml -v
bundle exec haml -v
gem regenerate_binstubs
USE_BUNDLER=no haml -v
USE_BUNDLER=try haml -v
bundle exec haml -v

You'll see that the first time I run 'USE_BUNDLER=try haml -v' it does not work, but after a new 'gem regenerate_binstubs' it works really well.

Did I get it right? If so, are you guys planning to address this issue?

Happy new year! :D

Best,
Daniel

rubygems-bundler-uninstaller: command not found

Hi,

On my fresh OSX Maverick installation, I can't execute rubygems-bundler-uninstaller:

$ sudo rubygems-bundler-uninstaller
Password:
sudo: rubygems-bundler-uninstaller: command not found

Note that I am forced to run bundle exec.


Here, more informations:

$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.2.1
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [universal.x86_64-darwin13]
  - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.0.0
  - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/bin
  - SPEC CACHE DIRECTORY: /Users/mehdi/.gem/specs
  - RUBYGEMS PLATFORMS:
    - ruby
    - universal-darwin-13
  - GEM PATHS:
     - /Library/Ruby/Gems/2.0.0
     - /Users/mehdi/.gem/ruby/2.0.0
     - /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--no-ri --no-rdoc"
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/share/npm/bin
     - /usr/local/bin
     - /Users/mehdi/Applications/Scripts
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /usr/local/bin
$ gem list

*** LOCAL GEMS ***

bundler (1.5.2)
bundler-unload (1.0.2)
CFPropertyList (2.2.0)
executable-hooks (1.3.1)
libxml-ruby (2.6.0)
nokogiri (1.5.6)
rubygems-bundler (1.4.2)
rubygems-update (2.2.1)
sqlite3 (1.3.7)
$ echo rubygems-bundler executable-hooks bundler-unload bundler$ | xargs -n 1 gem list -d

*** LOCAL GEMS ***

rubygems-bundler (1.4.2)
    Authors: Josh Hull, Michal Papis
    Homepage: http://mpapis.github.com/rubygems-bundler
    License: Apache 2.0
    Installed at: /Library/Ruby/Gems/2.0.0

    Stop using bundle exec

*** LOCAL GEMS ***

executable-hooks (1.3.1)
    Author: Michal Papis
    Homepage: https://github.com/mpapis/executable-hooks
    License: Apache 2.0
    Installed at: /Library/Ruby/Gems/2.0.0

    Hook into rubygems executables allowing extra actions to be taken
    before executable is run.

*** LOCAL GEMS ***

bundler-unload (1.0.2)
    Author: Michal Papis
    Homepage: https://github.com/mpapis/bundler-unload
    License: Apache 2.0
    Installed at: /Library/Ruby/Gems/2.0.0

    Allow unloading bundler after Bundler.load

*** LOCAL GEMS ***

bundler (1.5.2)
    Authors: André Arko, Terence Lee, Carl Lerche, Yehuda Katz
    Homepage: http://bundler.io
    License: MIT
    Installed at: /Library/Ruby/Gems/2.0.0

    The best way to manage your application's dependencies

rubygems-bundler (1.4.2)
    Authors: Josh Hull, Michal Papis
    Homepage: http://mpapis.github.com/rubygems-bundler
    License: Apache 2.0
    Installed at: /Library/Ruby/Gems/2.0.0

    Stop using bundle exec
$ ls -l /Library/Ruby/Gems/2.0.0
total 0
drwxr-xr-x  2 root  wheel   68 20 jan 10:25 build_info/
drwxr-xr-x  7 root  wheel  238 20 jan 10:58 cache/
drwxr-xr-x  2 root  wheel   68 20 jan 10:25 doc/
drwxr-xr-x  3 root  wheel  102 20 jan 10:27 extensions/
drwxr-xr-x  7 root  wheel  238 20 jan 10:58 gems/
drwxr-xr-x  7 root  wheel  238 20 jan 10:58 specifications/
$ ls -l /Users/mehdi/.gem/ruby/2.0.0/
total 0
drwxr-xr-x  3 mehdi  staff  102 20 jan 10:25 cache/
$ ls -l /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/gems/2.0.0/
total 0
drwxr-xr-x  3 root  wheel  102 25 aoû 05:33 bin/
drwxr-xr-x  2 root  wheel   68 25 aoû 05:32 build_info/
drwxr-xr-x  6 root  wheel  204 25 aoû 05:33 cache/
drwxr-xr-x  6 root  wheel  204 25 aoû 05:33 doc/
drwxr-xr-x  9 root  wheel  306  6 nov 15:24 gems/
drwxr-xr-x  7 root  wheel  238  6 nov 15:24 specifications/

if a BUNDLE_GEMFILE is specified noexec aborts...

Hi

Maybe I'm not using BUNDLE_GEMFILE properly but when it's set Bundler.setup is never called. So, in the code for noexec.rb

  def setup
      log "Noexec"
      return if %w(bundle rubygems-bundler-uninstaller).include?(File.basename($0))
      return if ENV['BUNDLE_GEMFILE'] # <--- bail out?
      return if %w(0 skip).include?( ENV['NOEXEC'] )
      gemfile = File.join(CURRENT, "Gemfile")
      while true
        if File.exist?(gemfile)
          log "Examining #{gemfile}"
          if Noexec.candidate?(gemfile, File.basename($0))
            log "Using #{gemfile}"
            ENV['BUNDLE_GEMFILE'] = gemfile
            Bundler.setup # <----- never get here
            return
          end
        end
      #and so on

Is there a reason for breaking out that fast? What I have is a custom Gemfile that's set and this is a gem from git (yes, I realize this is an edge case on top of an edge case).

I got it to work by doing this:

    def setup
      log "Noexec"
      return if %w(bundle rubygems-bundler-uninstaller).include?(File.basename($0))
      # removed return if ENV['BUNDLE_GEMFILE'] 
      return if %w(0 skip).include?( ENV['NOEXEC'] )
      gemfile = ENV['BUNDLE_GEMFILE'] || File.join(CURRENT, "Gemfile") # <-- and put it here

But I don't want to submit a pull request as you are MUCH more familiar with Gem and Bundler internals by now. Am I being dense?

"Unresolved specs" warning with Ruby 2.0.0-p247 and rubygems 2.0.3

I just installed Ruby 2.0.0-p247, followed by gem install rubygems-bundler. In p247 it seems that my Gemfile is no longer being honored. In addition, I get warnings about "Unresolved specs".

For example when using p247:

$ rbenv shell 2.0.0-p247 
$ guard
WARN: Unresolved specs during Gem::Specification.reset:
      lumberjack (>= 1.0.2)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
15:07:59 - INFO - Guard here! It looks like your project has a Gemfile, yet you are running
> [#] `guard` outside of Bundler. If this is your intent, feel free to ignore this
> [#] message. Otherwise, consider using `bundle exec guard` to ensure your
> [#] dependencies are loaded correctly.
> [#] (You can run `guard` with --no-bundler-warning to get rid of this message.)
15:07:59 - INFO - Guard uses TerminalNotifier to send notifications.
15:07:59 - INFO - Guard uses TerminalTitle to send notifications.
15:07:59 - INFO - Guard::RSpec is running

But Ruby 2.0.0-p195 is fine:

$ rbenv shell 2.0.0-p195 
$ guard
15:07:50 - INFO - Guard uses TerminalNotifier to send notifications.
15:07:50 - INFO - Guard uses TerminalTitle to send notifications.
15:07:50 - INFO - Guard::RSpec is running

I've run bundle install in both environments, and bundle exec guard works fine with no warnings.

Am I doing something wrong, or is this a problem with rubygems-bundler + 2.0.0-p247?

For the record, here are my ruby and gem versions:

$ rbenv shell 2.0.0-p195 
$ ruby -v
ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin12.3.0]
$ gem -v
2.0.2
$ rbenv shell 2.0.0-p247 
$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-darwin12.4.0]
$ gem -v
2.0.3

Manually installed gems outside of the Gemfile aren't executed properly.

Background: https://gist.github.com/swalberg/13cddd3a389b0a1bfaea

I have a Rails repo where I do my development on a Vagrant environment (guest) from an OSX box (host). My Gemfile contains capistrano but not vagrant. After upgrading rvm and ruby on my app, I was unable to run vagrant and cap from within my project directory. I was able to do it from my home directory and another Rails app.

I did an rvm implode and started again. Also removed everything from vendor/ruby in my project.

Running bundle install from the host let me access cap but not vagrant.

Adding exclude: [vagrant] to ./.noexec.yaml fixed the problem temporarily. Also, removing this file and then:

$ rubygems-bundler-uninstaller
archive-tar-minitar 0.5.2
bundler 1.3.4
capistrano 2.14.2
erubis 2.7.0
httparty 0.10.2
rake 10.0.4
#rake 0.9.2.2 not found in GEM_PATH
#rdoc 3.9.5 not found in GEM_PATH
rest-client 1.6.7
rubygems-bundler 1.1.1
vagrant 1.0.7

(seems to have) fixed it permanently.

FWIW I have a coworker who ran into the same problem but a lack of tenacity (or an affinity for the current hawtness) made him move over to rbenv.

Breaking the spring gem

I'm debugging an issue with the spring gem failing to load. This has lead me (down a long long trail) to rubygems-bundler. Hopefully the following trace will show the issue

[81, 90] in /Users/andy/.rvm/gems/ruby-1.9.3-p448@global/gems/rubygems-bundler-1.4.1/lib/rubygems-bundler/noexec.rb
   81        if File.file?(gemfile) && candidate?
   82          log "Keeping #{gemfile} loaded"
   83          Bundler.setup
   84          return
   85        end
=> 86        new_gemfile = File.expand_path("../../Gemfile", gemfile)
   87        break if new_gemfile == gemfile
   88        @gemfile = new_gemfile
   89      end
   90      log "No valid Gemfile found, moving on"
(rdb:1) gemfile
"/Users/andy/Sites/futuregov/patchwork/Gemfile"    # <- actual location of Gemfile
(rdb:1) n
/Users/andy/.rvm/gems/ruby-1.9.3-p448@global/gems/rubygems-bundler-1.4.1/lib/rubygems-bundler/noexec.rb:87
break if new_gemfile == gemfile

[82, 91] in /Users/andy/.rvm/gems/ruby-1.9.3-p448@global/gems/rubygems-bundler-1.4.1/lib/rubygems-bundler/noexec.rb
   82          log "Keeping #{gemfile} loaded"
   83          Bundler.setup
   84          return
   85        end
   86        new_gemfile = File.expand_path("../../Gemfile", gemfile)
=> 87        break if new_gemfile == gemfile
   88        @gemfile = new_gemfile                   
   89      end
   90      log "No valid Gemfile found, moving on"
   91    rescue LoadError
(rdb:1) new_gemfile
"/Users/andy/Sites/futuregov/Gemfile"         # <- NO GEMFILE HERE

Now I have no idea why this code is doing what its doing, or even if its wrong (it doesn't look correct), but the fact that Spring is failing with /Gemfile not found, and that somehow this code is executing when Spring runs (it loads bundler) makes me very suspicious.

Perhaps the code should check if the existing gemfile is actually a file before changing its path. Doing this after changing its path might also be an idea.

TIA

Andrew

rubygems-bundler-uninstaller fails weirdly

Hi,

Since a few days ago my gems started giving me errors about ruby_noexec_wrapper.
Now I tried uninstalling rubygems-bundler but the uninstaller fails absurdly

$ NOEXEC_DEBUG=1 rubygems-bundler-uninstaller                                                                                                                                                                                                            
Bin used: /Users/timosand/.rvm/gems/ruby-2.0.0-p247/bin/rubygems-bundler-uninstaller
Bin calculated: rubygems-bundler-uninstaller
Noexec - skipped binary: rubygems-bundler-uninstaller
/Users/timosand/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems.rb:286:in `bin_path': can't find gem rubygems-bundler ([">= 0"]) with executable rubygems-bundler-uninstaller (Gem::GemNotFoundException)
    from /Users/timosand/.rvm/gems/ruby-2.0.0-p247/bin/rubygems-bundler-uninstaller:23:in `<main>'
    from /Users/timosand/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/timosand/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'

Please help quickly, @mpapis

rubygems-bundler cripples bundle with --deployment option

When bundler is invoked with the --deployment option (best practice for deployments) it generates a .bundle/config file which explicitly disables the use of shared gems, i.e. an isolated bundle is to be created.

If rubygems-bundler is installed alongside the bundler gem, bundler will attempt to load it before it installs the gems specified in your Gemfile. But because we are by now operating in this "shared gems are disabled" setup, rubygems-bundler will not be found and the bundle will fail.

In this situation it seems you must completely uninstall rubygems-bundler before invoking bundler, or else avoid using the --deployment option.

Did I say the word "bundle" enough?

File.exist?(gemfile) in noexec.rb is true for directories

If there is a directory named Gemfile, the condition is true, but doomed to fail when bundler notices that it's a directory rather than a file.

I think the more correct implementation is to "require 'pathname'" then check "Pathname.new(gemfile).file?".

Exclude rvm global gems

It would be great to have an option so it would exclude all the gems I have in rvm global gemset, instead of specifying every binary by hand

rubygems-bundler: vagrant fails with "Could not locate Gemfile (Bundler::GemfileNotFound)

Invoking 'vagrant' fails on startup with this message.

To reproduce:

$ vagrant -h
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Usage: vagrant [-v] [-h] command []

-v, --version                    Print the version and exit.
-h, --help                       Print this help.

Available subcommands:
box
destroy
gem
halt
init
package
provision
reload
resume
ssh
ssh-config
status
suspend
up

For help on any individual command run vagrant COMMAND -h

Additional diagnostics:
$ NOEXEC=0 vagrant -h
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Error loading RubyGems plugin "/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/rubygems-bundler-1.0.2/lib/rubygems_plugin.rb": Could not locate Gemfile (Bundler::GemfileNotFound)
Usage: vagrant [-v] [-h] command []

-v, --version                    Print the version and exit.
-h, --help                       Print this help.

Available subcommands:
box
destroy
gem
halt
init
package
provision
reload
resume
ssh
ssh-config
status
suspend
up

For help on any individual command run vagrant COMMAND -h

ruby -rbundler -e "puts Bundler.settings[:disable_shared_gems]"
/home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler/shared_helpers.rb:22:in default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:213:indefault_gemfile'
from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:164:in root' from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:170:inapp_config_path'
from /home/karsten/.rvm/gems/ruby-1.9.3-p125@global/gems/bundler-1.1.4/lib/bundler.rb:182:in settings' from -e:1:in

'

Gem using :path gets passed over for regenerate binstubs

If a Gem is using the :path option in a Gemfile then it gets passed over when iterating through the specs

in regenerate_binstubs_command.rb, circa line 37

        cache_gem = File.join(org_gem_path, 'cache', spec.file_name)
        if File.exist? cache_gem
        # stuff
        else
          puts "##{spec.name} #{spec.version} not found in GEM_PATH" # <--- no love
        end

I don't think :path Gems get their spec copied to the cache... If I manually change the wrapper everything is peachy.

`rake foo` with an unmatched Gemfile dependency includes the full stacktrace, no "bundle install" suggestion

(I don't think this is specific to rake, but it's the original stimulus here.)

With an rvm-installed ruby and the bundler gem installed, here's a minimal reproduction showing what I mean:

mkdir -p /tmp/foo
cd /tmp/foo

echo 'source :rubygems

gem "sass", "= 99.9"' > Gemfile

rake foo

(The version of sass intentionally high to force a missing gem.)

From the $ rake foo command, there's a stacktrace as the output:

/home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'sass (= 99.9) ruby' in the gems available on this machine. (Bundler::GemNotFound)
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194@global/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
    from /home/adam/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
    from /home/adam/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
    from /home/adam/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
    from /home/adam/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'

Contrast that with the output from $ bundle exec rake foo:

Could not find gem 'sass (= 99.9) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.

To a user who is ignorant of Bundler, the stacktrace doesn't tell you how to fix it, despite it being very simple, whereas the bundle exec version makes it very clear. Since rubygems-bundler seems to intend to make the bundle exec redundant, and a missing gem dependency isn't such an exceptional case, I think it would be better to follow the simpler output instead of the stacktrace. (It also has the added bonus that to someone who doesn't yet fully understand how Bundler works, or when rake tasks are used as part of a non-Ruby project where Ruby ecosystem tools aren't assumed knowledge, it clearly tells you how to fix the problem immediately.)

Psych double loading problem with version > 1.1.0: psych.rb: warning: already initialized constant VERSION

Hi. I'm having a Psych loading problem in my Rails project (loaded twice). When I run a rake task (or even Zeus), I get the following warnings:

/Users/hugo/.rvm/gems/ruby-1.9.3-p385@score/gems/psych-2.0.1/lib/psych.rb:219: warning: already initialized constant VERSION
/Users/hugo/.rvm/gems/ruby-1.9.3-p385@score/gems/psych-2.0.1/lib/psych.rb:222: warning: already initialized constant LIBYAML_VERSION

I'm using RVM 1.22.15, ruby 1.9.3-p385, rubygems 2.1.5, bundler 1.3.5.

I can fix the issue by downgrading rubygems-bundler to version 1.1.0.

I inspected the source code and I see that noexec.rb requires 'yaml'. This of course is most likely loading the psych.rb included in ruby 1.9.3, which is version 1.3.4.

These are just warnings. But later, if I run some ActiveRecord code, it tries to call Psych::Visitors::YAMLTree.create which does not exist in version 1.3.4.

Short story, is there a way to fix this? Could noexec.rb unload yaml when done with parsing yaml stuff?

0.2.6 doesn't work with older versions of rubygems

this may be WAD but I figured I would point it out

using rubygems 1.7.2

the 0.2.6 gemspec has a date format that is unsupported

gems/1.8/specifications/rubygems-bundler-0.2.6.gemspec]: invalid date format in specification: "2011-09-16 00:00:00.000000000Z"

The source on github just has 2011-09-16 so guess whatever publishes it to rubygems modifies the date field, making it incompatible with older versions of rubygems.

for now I've reverted to 0.2.5.. upgrading to a newer rubygems is not currently an option for my project.

Tony

error when there is a invalid Gemfile in the current directory

Trying to jist a file and I get:

$ jist out
/Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.1.5/lib/bundler/dsl.rb:12:in `evaluate': There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.1.5/lib/bundler/definition.rb:18:in `build'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.1.5/lib/bundler.rb:135:in `definition'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/bundler-1.1.5/lib/bundler.rb:123:in `load'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:60:in `setup'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370@global/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:75
        from /Users/mat/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `gem_original_require'
        from /Users/mat/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:60:in `require'
        from /Users/mat/.rvm/gems/ruby-1.8.7-p370/bin/ruby_noexec_wrapper:9

Also, jist is not in that Gemfile, if it would ever help :-)

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec
via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

There is even a License Finder to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec.
Including a license in your gemspec is a good practice, in any case.

How did I find you?

I'm using a script to collect stats on gems, originally looking for download data, but decided to collect licenses too,
and make issues for missing ones as a public service :)
https://gist.github.com/bf4/5952053#file-license_issue-rb-L13 So far it's going pretty well

Does not appear to work with Rails 3.2.3

The Installation section of the readme says:

    gem install rubygems-bundler

Next run (once):

    gem regenerate_binstubs

And you're done!

However, I find that rails server still needs to be invoked with the incantation bundle exec rails server:

$ rails server
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
$ bundle exec rails server
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-05-31 05:13:51] INFO  WEBrick 1.3.1
[2012-05-31 05:13:51] INFO  ruby 1.9.3 (2012-04-20) [x86_64-darwin10.8.0]
[2012-05-31 05:13:51] INFO  WEBrick::HTTPServer#start: pid=1220 port=3000
^C[2012-05-31 05:15:30] INFO  going to shutdown ...
[2012-05-31 05:15:30] INFO  WEBrick::HTTPServer#start done.
Exiting
$ gem regenerate_binstubs
bundler 1.1.3
rake 0.9.2.2
rubygems-bundler 1.0.2
$ rails server
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.
$ bundle exec rails server
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2012-05-31 05:13:51] INFO  WEBrick 1.3.1
[2012-05-31 05:13:51] INFO  ruby 1.9.3 (2012-04-20) [x86_64-darwin10.8.0]
[2012-05-31 05:13:51] INFO  WEBrick::HTTPServer#start: pid=1220 port=3000
^C[2012-05-31 05:15:30] INFO  going to shutdown ...
[2012-05-31 05:15:30] INFO  WEBrick::HTTPServer#start done.
Exiting

breaks rails new

rails new command creates a Gemfile, but not Gemfile.lock.
It runs a bundle command, but on the parent directory's Gemfile, not the target.

rails new app
ls -l app/Gemfile*

gem regenerate_binstubs as ruby restores the expected behavior

system wide gems broken?

i using system wide gem, console utility, not related with any project.
when i cd into project with gemfile, its broken.

example, my gem confuddle and executable 'un':

gem list confuddle
*** LOCAL GEMS ***
confuddle (0.0.2)

which un
/home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un

un
---ok

after cd into some project with gemfile

gem list confuddle
*** LOCAL GEMS ***
confuddle (0.0.2)


which un
/home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un

un
/home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:812:in `report_activate_error': Could not find RubyGem confuddle (>= 0) (Gem::LoadError)
    from /home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:223:in `activate'
    from /home/kostya/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/site_ruby/1.8/rubygems.rb:1146:in `gem'
    from /home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/un:18
    from /home/kostya/.rvm/gems/ree-1.8.7-2012.02/bin/ruby_noexec_wrapper:14

is it bug of rubygems-bundler or something else?

The fix_wrapper.rb hook does not honor the env_shebang option

After installing a gem through "gem install mygem --env-shebang", after the wrapper gets overwritten by the fix-wrapper.rb hook, the shebang is overwritten as @env_shebang is not defined in RubyGemsBundlerInstaller. It should take into account the configuration passed in gem.

rubygems-bundler binstubs do not activate older versions of gems

Was testing rubygems-bundler and ran into this issue.

Steps to reproduce

  1. gem install rake gist rubygems-bundler
  2. gem regenerate_binstubs
  3. rails new foobar
  4. Add gem 'rake', '0.9.6' to Gemfile.
  5. bundle install --binstubs
  6. rails g resource Baz
  7. rake routes | gist

Expected Results

Runs rake 0.9.6 and the latest version of the gist gem.

Actual Results

rake aborted!
You have already activated rake 10.0.4, but your Gemfile requires rake 0.9.6. Using bundle exec may solve this.
/home/hal/.gem/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/home/hal/.gem/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/home/hal/.gem/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/home/hal/.gem/ruby/1.9.1/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `'
/home/hal/foobar/config/boot.rb:6:in `'
/home/hal/foobar/config/application.rb:1:in `'
/home/hal/foobar/Rakefile:5:in `'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/home/hal/.gem/ruby/1.9.1/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'

How to uninstall

Documentation bug/feature request:
One can remove the gem, but how does one back-out the changes to the binstubs?
The documentation doesn't say how to uninstall

Unable to execute tmuxinator without "bundle exec"

In a rails project with tmuxinator in gemfile, the only way to run tmuxinator is via "bundle exec".

I've done a "gem regenerate_binstubs" but it has no effect on the "tmuxinator" command - I still need to do "bundle exec tmuxinator".

ruby 2.0.0p247, rubygems-bundler 1.3.2

Please let me know if I can provide more information.

This Gem Breaks a Bundler Operation

It's pretty easy to reproduce. Create a Gemfile with this content:

gem "jammit", "0.6.5", git: "https://github.com/documentcloud/jammit.git"

Then try to bundle. It dies with an error.

recursive bundle install

$ cat Gemfile
gem 'haml'

$ cat Gemfile.lock 
GEM
specs:
  haml (3.0.23)

PLATFORMS
ruby

DEPENDENCIES
haml

$ bundle install
Could not find haml-3.0.23 in any of the sources
Run `bundle install` to install missing gems.

$ ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]

$ gem list bundler 

*** LOCAL GEMS ***

bundler (1.0.18) 

$ export USE_BUNDLER=

$ bundle install
Fetching source index for http://rubygems.org/
Installing haml (3.0.23) 
Using bundler (1.0.18) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Could not find 'rubygems-bundler' (>= 0)

When trying to update a certain gem (bundle update gemname) I get the following error message and the gem is not updated:

Error loading RubyGems plugin "/home/capistrano/.rvm/gems/ruby-2.0.0-p195@global/gems/rubygems-bundler-1.2.0/lib/rubygems_plugin.rb": Could not find 'rubygems-bundler' (>= 0) among 270 total gem(s) (Gem::LoadError)

This https://gist.github.com/mpapis/33668e76396ce52f5612#file-rubygems_plugin-rb fixed the error message but the gem still is not updated. Bundler is just running trough

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.