Home Download Buy Blog Forum Support

SublimeREPL

Re: SublimeREPL

Postby wuub on Tue May 15, 2012 8:04 am

Hmm, that's odd I am in an admin account. I'll roll back for now then.


Nah. Upgrade to 1.0.32 and you should be fine ;)
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby vitaLee on Wed May 16, 2012 12:08 pm

any idea how i can set ruby version to be different than system default.
im using RVM on OSX
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: SublimeREPL

Postby wuub on Wed May 16, 2012 12:41 pm

I'm not familiar with RVM. How do you set ruby version in bash?
SublimeREPL via Package Control & SublimePTY dev/pre-alpha. Donations are appreciated, but not required :) Twitter: @wuub
wuub
 
Posts: 218
Joined: Wed Aug 10, 2011 8:16 am
Location: Poland

Re: SublimeREPL

Postby francescob on Wed May 16, 2012 12:46 pm

wuub wrote:I'm not familiar with RVM. How do you set ruby version in bash?


by calling a script placed in .bashrc
I have the same problem :)
francescob
 
Posts: 20
Joined: Mon Apr 23, 2012 2:52 pm

Re: SublimeREPL

Postby vitaLee on Wed May 16, 2012 1:10 pm

as pointed by @francescob this bit is placed in .bash_profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
from there, one manages ruby versions through RVM (exmaple: rvm use ruby-1.9.3-p0 --default - sets default ruby version).
im no expert at shell and can't be of much help. :(
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: SublimeREPL

Postby vitaLee on Wed May 16, 2012 1:32 pm

ok i got it.
you need to make adjustment to Packages/SublimeREPL/config/Ruby/Main.sublime-menu
Code: Select all
"cmd": {
  "windows" : ["irb.bat", "--noreadline", "--inf-ruby-mode"],
  "linux"   : ["irb", "--noreadline", "--inf-ruby-mode"],
  "osx"     : ["/Users/user_name/.rvm/bin/default_irb", "--noreadline", "--inf-ruby-mode"]
},

and now it should respect current ruby version set in rvm
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: SublimeREPL

Postby francescob on Wed May 16, 2012 1:42 pm

are you sure that's working? i've tried this from terminal, my rvm default ruby is 1.8.7 (damn legacy projects..) and this is what happens:


Code: Select all
francesco$ /Users/francesco/.rvm/bin/default_irb
1.8.7 :001 > exit
francesco$ rvm use 1.9.2
Using /Users/francesco/.rvm/gems/ruby-1.9.2-p320
francesco$ /Users/francesco/.rvm/bin/default_irb
1.8.7 :001 >


i was expecting to see 1.9.2 there

Also, another thing, have you maybe tried to create a repl for rails console? i've tried but failing for 2 reason: i don't know how to tell the repl to cd to the project root folder, and the second reason is that i need to run script/console using the correct rvm environment
francescob
 
Posts: 20
Joined: Mon Apr 23, 2012 2:52 pm

Re: SublimeREPL

Postby vitaLee on Wed May 16, 2012 1:53 pm

what's you default RVM ruby version?
what does rvm list produce?
as i remember rvm use with no --defalut flag specified sets that version for current shell session, so in your case
if default version is 1.8.7 and you try to set 1.9.2 for current session and execute /Users/francesco/.rvm/bin/default_irb you ger warning.
vitaLee
 
Posts: 150
Joined: Tue Dec 27, 2011 11:10 pm

Re: SublimeREPL

Postby francescob on Wed May 16, 2012 1:57 pm

Code: Select all
francesco$ rvm list

rvm rubies

* ruby-1.8.7-head [ i686 ]
=> ruby-1.9.2-p320 [ x86_64 ]

# => - current
# =* - current && default
#  * - default
francescob
 
Posts: 20
Joined: Mon Apr 23, 2012 2:52 pm

Re: SublimeREPL

Postby francescob on Wed May 16, 2012 2:00 pm

Ok, if i switch between ruby versions using rvm use 1.9.2 --default
then /Users/francesco/.rvm/bin/default_irb honors the current ruby version
so it works but it doesn't sound ideal to set a new default everytime i switch rubies, but i guess i can live with that
francescob
 
Posts: 20
Joined: Mon Apr 23, 2012 2:52 pm

PreviousNext

Return to Plugin Announcements

Who is online

Users browsing this forum: Google [Bot] and 2 guests