#843 ✓invalid
David Bourget

'ruby -S' in hobo script doesn't work on systems with /usr/bin/rails shell script (e.g. ubuntu maverick meerkat)

Reported by David Bourget | November 7th, 2010 @ 10:50 PM

If I try

$hobo blah

as instructed in the tutorial I get:

/bin/sh: Illegal option -S /var/lib/gems/1.8/gems/hobo-1.0.1/bin/hobo:97: private method `split' called for nil:NilClass (NoMethodError)

That comes from line 96 in 'hobo':

96: v=#{RUBY} -S rails -v.split[1].split(".")

Rails is installed:

$ rails -v Rails 2.3.5

$ ruby -v ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]

The problem seems to be with the -S option:

$ ruby -S rails -v /bin/sh: Illegal option -S

-S is supposed to make ruby look for the specified script in PATH. The problem is that ruby is finding my /usr/bin/rails, a shell script to run rails. This script is installed by the ubuntu package named 'rails', a distribution of ruby on rails. This is true for maverick meerkat, which installs version 2.3.5-11 of 'rails'.

Assuming that the ruby script 'rails' is going to be the first script to turn up inside PATH seems like a big assumption.

I would suggest adding a config file that one can adapt according to one's environment.

Comments and changes to this ticket

  • Bryan Larsen

    Bryan Larsen November 15th, 2010 @ 06:55 PM

    • State changed from “new” to “invalid”

    Assuming that the ruby script 'rails' is going to be the first script to turn up inside PATH seems like the RIGHT assumption to me. We want the same effect as if the user had typed "rails" on the command line.

    If ruby -S rails doesn't work in Ubuntu with the Ubuntu supplied rails, please file a bug in the Ubuntu Launchpad.

    Using Ubuntu to install ruby gems has always been problematic. IMO the problem is with gem and not Ubuntu, but until the incompatibilities are completely worked out, you're better off installing ruby code using the "gem" command rather than the Ubuntu tools. (Even better would be to use RVM as well)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages