I'm trying to run a sinatra app within ruby mine. I recently switched from rvm to rbenv. I'm trying to get the application running via thin through the rubymine interface, and I'm running into trouble.
To start, the application starts on the command line using bundle exec.
Inside Rubymine, I've added the 1.9.3 SDK to the project via preferences.
I've setup the Run/Debug configurations as follows:
- Setup a Ruby Run Configuration
Ruby Script: /Users/me/.rbenv/shims/thin
Script Arguments: -p 8666 -R cal.ru start
Working Directory: /Users/me/gitcode/webapps/cal
Environment Variables: <blank>
Ruby arguments: -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)
Ruby SDK: Use Project Default SDK: ruby-1.9.3-p194
On the Bundler Tab:
Run the script in the context of the bundle (bundle exec) is selected.
When I try and run this configuration, I get the following error.
/Users/me/.rbenv/versions/1.9.3-p194/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/me/.rbenv/shims/thin -p 8666 -R cal.ru start
/Users/me/.rbenv/shims/thin:2:in `<top (required)>': undefined local variable or method `e' for main:Object (NameError)
from -e:1:in `load'
from -e:1:in `<main>'
Process finished with exit code 1
I can't seem to figure out what is causing the error. Something about -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) seems to be bombing, but I'm not sure how to trouble shoot it. Or if it's a different problem related to the setup of rbenv.
Please let me know if any more information will help.