rvm/rubygems-bundler

Unable to execute tmuxinator without "bundle exec"

johnlane opened this issue · 7 comments

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.

please try this:

rvm use @global
for g in rubygems-bundler executable-hooks bundler-unload
do gem uninstall $g -ax
done
gem install rubygems-bundler
rvm use @default
gem regenerate_binstubs
head -n 1 $(tmuxinator)
NOEXEC_DEBUG=1 tmuxinator

On 28/09/13 21:19, Michal Papis wrote:

please try this:

rvm use @global
forg in rubygems-bundler executable-hooks bundler-unload
dogem uninstall$g -ax
done
gem install rubygems-bundler
rvm use @default
gem regenerate_binstubs
head -n 1$(tmuxinator)
NOEXEC_DEBUG=1 tmuxinator


Reply to this email directly or view it on GitHub
#52 (comment).

Here is the result:

504 $ rvm use @global
Using /usr/local/rvm/gems/ruby-2.0.0-p247 with gemset global

505 $ for g in rubygems-bundler executable-hooks bundler-unload

do gem uninstall $g -ax
done
Successfully uninstalled rubygems-bundler-1.3.2
Removing executable-hooks-uninstaller
Successfully uninstalled executable-hooks-1.2.3
Successfully uninstalled bundler-unload-1.0.2

506 $ gem install rubygems-bundler
Fetching: bundler-unload-1.0.2.gem (100%)
Successfully installed bundler-unload-1.0.2
Fetching: executable-hooks-1.2.3.gem (100%)
Building native extensions. This could take a while...
Successfully installed executable-hooks-1.2.3
Fetching: rubygems-bundler-1.3.3.gem (100%)
Successfully installed rubygems-bundler-1.3.3
Parsing documentation for bundler-unload-1.0.2
Installing ri documentation for bundler-unload-1.0.2
Parsing documentation for executable-hooks-1.2.3
Installing ri documentation for executable-hooks-1.2.3
Parsing documentation for rubygems-bundler-1.3.3
Installing ri documentation for rubygems-bundler-1.3.3
3 gems installed

507 $ rvm use @default
Using /usr/local/rvm/gems/ruby-2.0.0-p247

508 $ gem regenerate_binstubs
try also: gem pristine --binstubs
bundler 1.3.5
executable-hooks 1.2.3
rake 10.1.0
#rake 0.9.6 not found in GEM_PATH
#rdoc 4.0.0 not found in GEM_PATH
#test-unit 2.0.0.0 not found in GEM_PATH

509 $ head -n 1 $(tmuxinator)
-bash: tmuxinator: command not found
^C

I then tried it in my gemset

510 $ rvm use ruby-2.0.0-p247@combisite
Using /usr/local/rvm/gems/ruby-2.0.0-p247 with gemset combisite

511 $ head -n 1 $(tmuxinator)
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in
to_specs': Could not find 'tmuxinator' (>= 0) among 81 total gem(s) (Gem::LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in to_spec'
from
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/tmuxinator:22:in

'
from
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in
eval' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in '
^C

130 512 $ gem regenerate_binstubs
try also: gem pristine --binstubs
RedCloth 4.2.9
bundler 1.3.5
cucumber 1.3.6
diff-lcs 1.2.4
erubis 2.7.0
executable-hooks 1.2.3
launchy 2.3.0
nokogiri 1.6.0
rack 1.5.2
railties 4.0.0
rake 10.1.0
#rake 0.9.6 not found in GEM_PATH
rdiscount 2.1.6
#rdoc 4.0.0 not found in GEM_PATH
rdoc 3.12.2
rspec-core 2.14.5
sass 3.2.10
sdoc 0.3.20
sprockets 2.10.0
#test-unit 2.0.0.0 not found in GEM_PATH
thor 0.18.1
tilt 1.4.1
treetop 1.4.15

513 $ bundle show tmuxinator
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bundler/gems/tmuxinator-b291bfc2eb25

514 $ gem list | grep tmuxinator

1 515 $ head -n 1 $(tmuxinator)
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in
to_specs': Could not find 'tmuxinator' (>= 0) among 81 total gem(s) (Gem::LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in to_spec'
from
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/tmuxinator:22:in

'
from
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in
eval' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in '
^C

130 516 $

Thanks for your help.
John

oh there was one bug in my code for you, please run this:

head -n 1 $(which tmuxinator)
NOEXEC_DEBUG=1 tmuxinator

... but I think I know what could be the problem here, this is git gem? can you show your line for tmuxinator in Gamfile?

On 30/09/13 11:00, Michal Papis wrote:

oh there was one bug in my code for you, please run this:

head -n 1$(which tmuxinator)
NOEXEC_DEBUG=1 tmuxinator
539 $ head -n 1 $(which tmuxinator)
#!/usr/bin/env ruby_executable_hooks

540 $ NOEXEC_DEBUG=1 tmuxinator
Bin used:
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks
Bin calculated: ruby_executable_hooks
Noexec - starting check
Examining /home/john/files/interest/computer/work/git/combisite/Gemfile
Considering
"/home/john/files/interest/computer/work/git/combisite/.noexec.yaml"
No valid Gemfile found, moving on
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:298:in
to_specs': Could not find 'tmuxinator' (>= 0) among 81 total gem(s) (Gem::LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/dependency.rb:309:in to_spec'
from
/usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_gem.rb:47:in
gem' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/tmuxinator:22:in

'
from
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in
eval' from /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks:14:in '

1 541 $

... but I think I know what could be the problem here, this is git
gem? can you show your line for |tmuxinator| in |Gamfile|?

group :development do
gem 'tmuxinator', :git => 'https://github.com/aziz/tmuxinator.git',
:branch => '0.7.0-wip'
end

So yes it is a git gem, and a specific branch too.


Reply to this email directly or view it on GitHub
#52 (comment).

can I see gem list from the mentioned gemset - it looks like old executable-hooks might be still installed there ... if it is not then just:

rm -f /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks

On 30/09/13 16:41, Michal Papis wrote:

can I see |gem list| from the mentioned gemset

503 $ gem list

*** LOCAL GEMS ***

actionmailer (4.0.0)
actionpack (4.0.0)
activemodel (4.0.0)
activerecord (4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.0)
acts_as_list (0.3.0)
addressable (2.3.5)
arel (4.0.0)
atomic (1.1.13)
bcrypt-ruby (3.0.1)
bigdecimal (1.2.0)
builder (3.1.4)
bundler (1.3.5)
bundler-unload (1.0.2)
capybara (2.1.0)
coffee-rails (4.0.0)
coffee-script (2.2.0)
coffee-script-source (1.6.3)
colorbox-rails (0.1.0)
cucumber (1.3.6)
cucumber-rails (1.4.0)
database_cleaner (1.1.1)
diff-lcs (1.2.4)
erubis (2.7.0)
execjs (2.0.1)
executable-hooks (1.2.3)
factory_girl (4.2.0)
faker (1.2.0)
gherkin (2.12.1)
hike (1.2.3)
i18n (0.6.5)
io-console (0.4.2)
jbuilder (1.5.1)
jquery-rails (3.0.4)
json (1.8.0, 1.7.7)
launchy (2.3.0)
mail (2.5.4)
mime-types (1.25)
mini_portile (0.5.1)
minitest (4.7.5, 4.3.2)
multi_json (1.7.9)
multi_test (0.0.2)
nokogiri (1.6.0)
polyglot (0.3.3)
psych (2.0.0)
rack (1.5.2)
rack-test (0.6.2)
rails (4.0.0)
rails-i18n (0.7.4)
railties (4.0.0)
rake (10.1.0, 0.9.6)
rdiscount (2.1.6)
rdoc (4.0.0, 3.12.2)
RedCloth (4.2.9)
rspec-core (2.14.5)
rspec-expectations (2.14.2)
rspec-mocks (2.14.3)
rspec-rails (2.14.0)
rubygems-bundler (1.3.3)
rvm (1.11.3.8)
sass (3.2.10)
sass-rails (4.0.0)
sdoc (0.3.20)
sprockets (2.10.0)
sprockets-rails (2.0.0)
sqlite3 (1.3.8)
test-unit (2.0.0.0)
thor (0.18.1)
thread_safe (0.1.2)
tilt (1.4.1)
treetop (1.4.15)
turbolinks (1.3.0)
tzinfo (0.3.37)
uglifier (2.2.1)
wirble (0.1.3)
xpath (2.0.0)

  • it looks like old |executable-hooks| might be still installed there
    ... if it is not then just:

rm -f /usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks
504 $ ls -l
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks
-rwxrwxr-x 1 john vm 393 Sep 24 16:47
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks

505 $ rm -f
/usr/local/rvm/gems/ruby-2.0.0-p247@combisite/bin/ruby_executable_hooks

After that, still didn't work. I tried a "gem regenerate_binstubs" which
didn't list tmuxinator in its output.

However, it now works!

Thank you very much for getting to the bottom of it. Much appreciated.
John


Reply to this email directly or view it on GitHub
#52 (comment).

closing this issue as problem is fixed,

please let me know if you hit problems with it again - I have tests in place to prevent this again so it should just work next time you update.