When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single- location binary can cause a problem. I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up. -s
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations. - Matt On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote:
When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec. I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :) Eloy On 2 nov 2009, at 08:40, Matt Aimonetti wrote:
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations.
- Matt
On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote: When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
That would probably be the best solution in the interim. I personally install all of my MacRuby gems in ~/.gem/macruby/1.9.0 (which is the default directory if you don't run macgem under sudo). This way /usr/bin is not altered and when I want to run a MacRuby gem helper I simply append ~/.gem/macruby/1.9.0/bin to my $PATH. Laurent On Nov 2, 2009, at 12:06 AM, Eloy Duran wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec.
I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
Eloy
On 2 nov 2009, at 08:40, Matt Aimonetti wrote:
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations.
- Matt
On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote: When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi ALL, it's not too much of an issue if one is using the Ruby Version Manager (RVM) because it creates separate executable and gem directories for each Ruby implementation. I haven't used MacRuby under RVM but it seems to do an excellent job of adding the appropriate executables to the path based on the current Ruby implementation. -Conrad On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec.
I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
Eloy
On 2 nov 2009, at 08:40, Matt Aimonetti wrote:
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations.
- Matt
On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote:
When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hey Conrad, I agree that you don't notice the issue if you use RVM. But the fact remains that the issue still exists… So as an interim solution you can indeed use RVM or, like Laurent does, use a separate gem home, but on the long run, imo, RubyGems should be enhanced to take care of this. I, for instance, haven't been able to get RVM to work (disclaimer: I haven't spent a lot of time trying to get it to work). Eloy On Nov 2, 2009, at 9:26 AM, Conrad Taylor wrote:
Hi ALL, it's not too much of an issue if one is using the Ruby Version Manager (RVM) because it creates separate executable and gem directories for each Ruby implementation. I haven't used MacRuby under RVM but it seems to do an excellent job of adding the appropriate executables to the path based on the current Ruby implementation.
-Conrad
On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote: I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec.
I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
Eloy
On 2 nov 2009, at 08:40, Matt Aimonetti wrote:
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations.
- Matt
On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote: When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi Eloy, I have spent a bit of time with it. Here's what I did to get things going: 1) sudo gem install rvm 2) add the following to your .profile after the last 'export PATH=' setting: if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi Note: I didn't like running the 'rvm-install' because it created several different shell files: ~/.bash_profile, ~/.bashrc, ~/.zshrc where each file contained similar content. 3) rvm list --all Note: The above gets a listing of all the available interpreters. Also, I remember seeing macruby in the list and I'll query the rvm list to see if this can be reinstated. 4) install some interpreters rvm install 1.9.1 1.9.2 Note: The above install ruby 1.9.1 and 1.9.2 5) set the default ruby interpreter rvm 1.9.2 --default or ... Rubygems is great but the RVM team was able to get something working in a short amount of time. Also, the gemcutter is a very good example of extending the gem command. For example, after installing the gemcutter gem, it inherits the 'tumble' option. Thus,one can do the following: gem tumble -Conrad On Mon, Nov 2, 2009 at 1:34 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
Hey Conrad,
I agree that you don't notice the issue if you use RVM. But the fact remains that the issue still exists…
So as an interim solution you can indeed use RVM or, like Laurent does, use a separate gem home, but on the long run, imo, RubyGems should be enhanced to take care of this. I, for instance, haven't been able to get RVM to work (disclaimer: I haven't spent a lot of time trying to get it to work).
Eloy
On Nov 2, 2009, at 9:26 AM, Conrad Taylor wrote:
Hi ALL, it's not too much of an issue if one is using the Ruby Version Manager (RVM) because it creates separate executable and gem directories for each Ruby implementation. I haven't used MacRuby under RVM but it seems to do an excellent job of adding the appropriate executables to the path based on the current Ruby implementation.
-Conrad
On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com>wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec.
I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
Eloy
On 2 nov 2009, at 08:40, Matt Aimonetti wrote:
Unfortunately this is not an issue with MacRuby, you would have many issues with ruby1.9 or any other implementations.
- Matt
On Sun, Nov 1, 2009 at 10:52 PM, s.ross <cwdinfo@gmail.com> wrote:
When installing the gem using macgem, a shebang line is written pointing to macruby. The "spec" binary copied into /usr/bin forever after (or until manually edited or reinstalled) contains that shebang. Until MacRuby is close to parity with MRI (say... when MRI can run Rails), this may make less difference. Now, however, the single-location binary can cause a problem.
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
-s _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hey Conrad,
Hi Eloy, I have spent a bit of time with it. Here's what I did to get things going:
1) sudo gem install rvm
2) add the following to your .profile after the last 'export PATH=' setting:
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/ rvm ; fi
Note: I didn't like running the 'rvm-install' because it created several different shell files:
~/.bash_profile, ~/.bashrc, ~/.zshrc
where each file contained similar content.
Yeah this is I think where it went wrong for me. Thanks! I'll give that a try tonight.
Rubygems is great but the RVM team was able to get something working in a short amount of time.
Yeah, but the point is that this is a problem of RubyGems, nobody else's even though others provide workarounds. Ruby allows one to specify the prefix/suffix, so RubyGems should inherit this transparently imo. But I think that in the end we agree on how the user should experience this, ie transparent :) Eloy
On Mon, Nov 2, 2009 at 2:46 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
Hey Conrad,
Hi Eloy, I have spent a bit of time with it. Here's what I did to get things going:
1) sudo gem install rvm
2) add the following to your .profile after the last 'export PATH=' setting:
if [ -s ~/.rvm/scripts/rvm ] ; then source ~/.rvm/scripts/rvm ; fi
Note: I didn't like running the 'rvm-install' because it created several different shell files:
~/.bash_profile, ~/.bashrc, ~/.zshrc
where each file contained similar content.
Yeah this is I think where it went wrong for me. Thanks! I'll give that a try tonight.
Rubygems is great but the RVM team was able to get something working in a short amount of time.
Yeah, but the point is that this is a problem of RubyGems, nobody else's even though others provide workarounds. Ruby allows one to specify the prefix/suffix, so RubyGems should inherit this transparently imo. But I think that in the end we agree on how the user should experience this, ie transparent :)
Eloy
Eloy, I agree with 100%. -Conrad
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hey, On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec. I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
We have some existing RubyGems bugs around this issue: http://rubyforge.org/tracker/index.php?func=detail&aid=26754&group_id=126&at... http://rubyforge.org/tracker/index.php?func=detail&aid=25826&group_id=126&at... There's been a certain amount of discussion about this on rubygems-developers, might be worth a grep of the mailing list. ~ j.
Just FYI, I found one of the major issue with macruby + rspec, the problem being that rspec relies on Kernel.caller and MacRuby's version isn't fully compatible with C Ruby's. Anyone knows of rspec matchers for bacon? - Matt On Mon, Nov 2, 2009 at 11:37 AM, John Barnette <jbarnette@gmail.com> wrote:
Hey,
On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec. I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
We have some existing RubyGems bugs around this issue:
http://rubyforge.org/tracker/index.php?func=detail&aid=26754&group_id=126&at...
http://rubyforge.org/tracker/index.php?func=detail&aid=25826&group_id=126&at...
There's been a certain amount of discussion about this on rubygems-developers, might be worth a grep of the mailing list.
~ j. _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Matt, you are correct because I'm seeing 9 failures at this time. -Conrad On Mon, Nov 2, 2009 at 12:55 PM, Matt Aimonetti <mattaimonetti@gmail.com>wrote:
Just FYI, I found one of the major issue with macruby + rspec, the problem being that rspec relies on Kernel.caller and MacRuby's version isn't fully compatible with C Ruby's. Anyone knows of rspec matchers for bacon?
- Matt
On Mon, Nov 2, 2009 at 11:37 AM, John Barnette <jbarnette@gmail.com>wrote:
Hey,
On Mon, Nov 2, 2009 at 12:06 AM, Eloy Duran <eloy.de.enige@gmail.com> wrote:
I think the best solution would be if RubyGems would apply the same program prefix or suffix to the executables it installs. So in the case of MacRuby, the executable would be: /usr/bin/macspec. I haven't had the time to look at RubyGems yet though, if anyone wants to take a stab at fixing this, by all means :)
We have some existing RubyGems bugs around this issue:
http://rubyforge.org/tracker/index.php?func=detail&aid=26754&group_id=126&at...
http://rubyforge.org/tracker/index.php?func=detail&aid=25826&group_id=126&at...
There's been a certain amount of discussion about this on rubygems-developers, might be worth a grep of the mailing list.
~ j. _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On Nov 1, 2009, at 10:52 PM, s.ross wrote:
I'm not sure what a sensible solution is to this, but thought since rSpec is getting some attention, I'd bring this up.
You can always override the shebang line by running a script directly with ruby (it's not a coincidence that the shebang line is also a valid ruby comment). So, the easiest way to switch back and forth between running rspec under MacRuby and Ruby 1.9 would be:
sudo macgem install rspec sudo gem1.9 install rspec spec blah_spec.rb <= runs under MacRuby ruby1.9 `which spec` blah_spec.rb <= runs under Ruby 1.9
From there, it shouldn't be too hard to alias the last line to something like spec1.9 and you should be all set. Cheers, Josh
I don't know how relevant folks will consider this, but I've been working on ways to use Cucumber to test SketchUp plugins. Some of the same tricks might be relevant to MacRuby apps... Using Cucumber with SketchUp http://www.cfcl.com/rdm/weblog/archives/001714.html -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm@cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development
participants (8)
-
Conrad Taylor
-
Eloy Duran
-
John Barnette
-
Joshua Ballanco
-
Laurent Sansonetti
-
Matt Aimonetti
-
Rich Morin
-
s.ross