How do I use bundle exec in Aptana Studio 3.0.9 to run the debugger?

▼魔方 西西 提交于 2019-12-13 07:16:23

问题


Aptana seems to start in the sh shell. So I'm trying to switch to zsh, and execute commands to start a rails app.

I've changed my debug executable so that it runs a unix executable with the following contents:

#!/usr/bin/env ruby
exec("zsh | (echo $SHELL && [[ -s '$HOME/.rvm/scripts/rvm' ]] && source '$HOME/.rvm/scripts/rvm' && rvm use 1.8.7@tinderbox && (bundle exec script/server -p3001 &))")

So, when I click my debug executable from the debug menu on the toolbar, the debug perspective appears, and it shows that

myApp [Ruby Application]    
    Ruby    
    /usr/bin/ruby   

is running and hasn't been terminated. but when I go to my browser and type in 0.0.0.0:3001, I get "Oops! Google Chrome could not connect to localhost:3001" - which means that the server sin't running.

I have the output of the executable set to a file on my desktop here is what happens every run:

 Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.10.4) listens on 127.0.0.1:55306
/bin/zsh
  • Note: I get the same results with bash as with zsh

What is going on? and how do I get my command to work?


回答1:


type

zsh -l

and in new zsh shell:

rvm 1.8.7 do bundle exec script/server -p3001

or with rvm wrapper:

generate wrapper for bundle:

rvm wrapper 1.8.7 run bundle

it will generate run_bundle, find it:

which run_bundle

and use it in aptana:

/path/to/run_bundle exec script/server -p3001


来源:https://stackoverflow.com/questions/10179081/how-do-i-use-bundle-exec-in-aptana-studio-3-0-9-to-run-the-debugger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!