This forum is no longer active. Please post your questions to our new community site

RubyMine + RubyStack

Subscribe to RubyMine + RubyStack 2 post(s), 2 voice(s)

 
Avatar arnoldcano 1 post

I was having trouble running tests within RubyMine 2.0.1 using RubyStack 2.0-3. I editted my ~/.profile to source /rubyconsole so that all the paths were correct from the terminal. However, because the /ruby/bin/ruby actually sources /scripts/setenv.sh it was setting RUBYLIB in a way that did not allow RubyMine to append its paths to the RUBYLIB environment variable. I was able to fix it by changing one line in the setenv.sh file as follows:

It was…

RUBYLIB=“/Applications/RubyStack/ruby/lib:/Applications/RubyStack/ruby/lib/ruby:/Applications/RubyStack/ruby/lib/ruby/1.8:/Applications/RubyStack/ruby/lib/ruby/1.8/i686-darwin8.5.3:/Applications/RubyStack/ruby/lib/ruby/1.8/i686-darwin8.10.2:/Applications/RubyStack/ruby/lib/ruby/1.8/powerpc-darwin8.4.0:/Applications/RubyStack/ruby/lib/ruby/1.8/powerpc-darwin8.6.0:/Applications/RubyStack/ruby/lib/ruby/site_ruby:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/i686-darwin8.5.3:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/i686-darwin8.10.2:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.4.0:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.6.0”

Is now…

RUBYLIB=“$RUBYLIB:/Applications/RubyStack/ruby/lib:/Applications/RubyStack/ruby/lib/ruby:/Applications/RubyStack/ruby/lib/ruby/1.8:/Applications/RubyStack/ruby/lib/ruby/1.8/i686-darwin8.5.3:/Applications/RubyStack/ruby/lib/ruby/1.8/i686-darwin8.10.2:/Applications/RubyStack/ruby/lib/ruby/1.8/powerpc-darwin8.4.0:/Applications/RubyStack/ruby/lib/ruby/1.8/powerpc-darwin8.6.0:/Applications/RubyStack/ruby/lib/ruby/site_ruby:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/i686-darwin8.5.3:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/i686-darwin8.10.2:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.4.0:/Applications/RubyStack/ruby/lib/ruby/site_ruby/1.8/powerpc-darwin8.6.0”

Notice how the $RUBYLIB is at the front and not the end? This is so that it works for both Test::Unit and RSpec style tests.

Hope this helps someone.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Thanks for posting this! I’m sure this will helpful for other users.