Bundler broken

7 views
Skip to first unread message

Jamie Orchard-Hays

unread,
Mar 2, 2018, 9:20:00 AM3/2/18
to railsmachin...@googlegroups.com
There was a notice on ruby doc about a Ruby Gem vulnerability, so I manually updated Ruby Gems on my servers. Now, on cap deploy, the system can’t find bundler. I’ve manually installed, but it’s not where Moonshine expects:

Notice: /Exec[bundle install]/returns: /usr/local/bin/bundle:23:in `load': cannot load such file -- /usr/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/exe/bundle (LoadError)

Bryan Traywick

unread,
Mar 2, 2018, 11:38:44 AM3/2/18
to railsmachin...@googlegroups.com
Hey Jamie,

I would try removing or renaming /usr/local/bin/bundle. I suspect there is an old binstub in /usr/local/bin for bundler that is broken in some way. If it still doesn't work after moving/renaming this file try running `sudo gem pristine --all`. Note, there may be other binstubs in /usr/local/bin that need to be removed/renamed as well.

Thanks,
-- Bryan Traywick

On Mar 2, 2018, at 9:19 AM, Jamie Orchard-Hays <jami...@gmail.com> wrote:

There was a notice on ruby doc about a Ruby Gem vulnerability, so I manually updated Ruby Gems on my servers. Now, on cap deploy, the system can’t find bundler. I’ve manually installed, but it’s not where Moonshine expects:

Notice: /Exec[bundle install]/returns: /usr/local/bin/bundle:23:in `load': cannot load such file -- /usr/lib/ruby/gems/2.1.0/gems/bundler-1.16.1/exe/bundle (LoadError)

--
You received this message because you are subscribed to the Google Groups "Moonshine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsmachine-moon...@googlegroups.com.
To post to this group, send email to railsmachin...@googlegroups.com.
Visit this group at https://groups.google.com/group/railsmachine-moonshine.
For more options, visit https://groups.google.com/d/optout.

Jamie Orchard-Hays

unread,
Mar 2, 2018, 11:43:12 AM3/2/18
to railsmachin...@googlegroups.com
Thanks. I see:

rwxr-xr-x 1 root root 602 Mar  2 14:11 /usr/local/bin/bundle*
-rwxr-xr-x 1 root root 604 Mar  2 14:11 /usr/local/bin/bundler*

and 

-rwxr-xr-x 1 root root 948 Mar  1 18:51 /usr/bin/bundle2.1*

On my working system, they’re in /usr/bin:

-rwxr-xr-x 1 root root 599 Jan 11 23:07 /usr/bin/bundle*
-rwxr-xr-x 1 root root 601 Jan 11 23:07 /usr/bin/bundler*

Looks like manually installing went to a different location than when using Moonshine.

Jamie Orchard-Hays

unread,
Mar 2, 2018, 2:58:19 PM3/2/18
to railsmachin...@googlegroups.com
I was going nowhere fast, so I just set the proper bundler and gem versions in moonshine.yml and reinstalled ruby on all servers using capistrano/moonshine. Executing `bundle —version` now works as expected without errors.

However, now deployments tell me:

sudo: unable to execute /usr/local/bin/shadow_puppet

I ran `cap deploy:setup` and got the same error. I’m really going down a rabbit hole here.

Jamie

Jamie Orchard-Hays

unread,
Mar 2, 2018, 3:02:23 PM3/2/18
to railsmachin...@googlegroups.com
In addition, `ll` tells me that shadow_puppet is present on all servers (the rest of the error message was ": No such file or directory”.

ll /usr/local/bin/
total 32
drwxr-xr-x  2 root root 4096 Mar  2 19:35 ./
drwxr-xr-x 10 root root 4096 Apr  1  2015 ../
-rwxr-xr-x  1 root root  598 Mar  1 18:51 facter*
-rwxr-xr-x  1 root root  592 Mar  1 18:51 hiera*
-rwxr-xr-x  1 root root  598 Mar  1 18:51 puppet*
-rwxr-xr-x  1 root root  586 Mar  1 18:51 rake*
-rwxr-xr-x  1 root root  640 Mar  1 18:51 shadow_puppet*
-rwxr-xr-x  1 root root  652 Mar  1 18:51 update_rubygems*
Reply all
Reply to author
Forward
0 new messages