> No need for `rbenv rehash` or similar, because there's no binstubs, just 
> $PATH.

That would be nice. It doesn't affect me too often, but now and then, I install 
a gem, and I'm baffled that binary is still running the older version (it's 
more obvious when I don't have any older version and it just can't find the 
command). Maybe I'll give it a go next time I happen to be setting up a new dev 
environment.

Thanks for pointing those out.

Srushti

On 13-Jul-2013, at 5:28 PM, Paul Annesley wrote:

> Some other chruby selling points:
> 
> No need for `rbenv rehash` or similar, because there's no binstubs, just 
> $PATH.
> 
> It's very simple and light-weight.
> The core is 94 lines of shell script:
> https://github.com/postmodern/chruby/blob/master/share/chruby/chruby.sh
> And the optional auto-switching by .ruby-version file is 37 lines:
> https://github.com/postmodern/chruby/blob/master/share/chruby/auto.sh
> 
> More info at https://github.com/postmodern/chruby#readme
> 
> (Also, it's in homebrew; `brew install chruby`)
> 
> Here's an example .gemrc containing the --env-shebang option:
> https://github.com/pda/dotfiles/blob/master/gemrc
> 
> — Paul
> 
> 
> On Sat, Jul 13, 2013 at 8:42 PM, Srushti Ambekallu <[email protected]> wrote:
>> The way chruby works, gems are shared between patch-level rubies. eg, gems 
>> for 2.0.0-p0 and 2.0.0-p247 go in the same directory identified by "2.0.0" 
>> in the path.
> 
> That makes a lot of sense. I've never used chruby myself (RVM till I moved to 
> rbenv, both of which maintain different directories for each patchlevel). How 
> else does chruby compare to either of those two?
> 
> Thanks,
> Srushti
> 
> On 13-Jul-2013, at 3:54 PM, Paul Annesley wrote:
> 
>> The way chruby works, gems are shared between patch-level rubies. eg, gems 
>> for 2.0.0-p0 and 2.0.0-p247 go in the same directory identified by "2.0.0" 
>> in the path.
>> 
>> For this to work properly, gems should be installed with --env-shebang, 
>> which can go in your ~/.gemrc, and prevents RubyGems from tying its 
>> bin-stubs to a specific ruby.
>> 
>> — Paul
>> 
>> 
>> On Saturday, July 13, 2013, Chris Berkhout wrote:
>> Yes, native extensions was my first thought.
>> 
>> Also, any gem can specify a required Ruby version 
>> (http://docs.rubygems.org/read/chapter/20#required_ruby_version), so a plain 
>> Ruby gem may not install on all versions of Ruby, even if the actual code 
>> would run in theory.
>> 
>> Cheers,
>> Chris
>> 
>> 
>> 
>> On Sat, Jul 13, 2013 at 4:15 PM, Luke Hamilton <[email protected]> wrote:
>> Hi all,
>> 
>> Can some tell me why we need a $GEM_PATH location per ruby versions when 
>> using tools like RVM & rbenv? 
>> 
>> I would like to switch between rubies without always need to download the 
>> gem's a second time as I am currently working off a very poor internet 
>> connection.
>> 
>> Thanks!
>> Luke Hamilton
>> 
>> “When I let go of what I am, I become what I might be.” – Lao Tzu
>>  
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Ruby or Rails Oceania" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/rails-oceania.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rails-oceania.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby or Rails Oceania" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/rails-oceania.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rails-oceania.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to