如何在Aptana Studio 3.0.9中使用bundle exec运行调试器? [英] How do I use bundle exec in Aptana Studio 3.0.9 to run the debugger?

查看:127
本文介绍了如何在Aptana Studio 3.0.9中使用bundle exec运行调试器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Aptana似乎从 sh shell开始。所以我试图切换到 zsh ,并执行命令启动rails应用程序。



我有更改了我的调试可执行文件,以便它运行一个具有以下内容的unix可执行文件:

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

所以,当我从工具栏上的调试菜单中单击我的调试可执行文件时,出现调试透视图,并显示

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

正在运行,尚未终止。
但是当我去浏览器并输入0.0.0.0:3001时,我得到糟糕!Google Chrome无法连接到localhost:3001 - 这意味着服务器没有运行。



我将桌面上的文件的可执行文件的输出设置为每次运行时会发生什么:

 快速调试器(ruby-debug-ide 0.4.16,ruby-debug-base 0.10.4)侦听127.0.0.1:55306 
/ bin / zsh




  • 注意:与zsh相同的结果与bash相同



    • 发生了什么事?如何让我的命令工作?

      解决方案

      类型

        zsh -l 

      和新的zsh shell: p>

        rvm 1.8.7 do bundle exec script / server -p3001 

      或使用rvm包装器:



      生成包装的包装:

        rvm wrapper 1.8.7 run bundle 

      生成 run_bundle ,找到它:

       哪个run_bundle 

      并在aptana中使用它:

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


      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?

      解决方案

      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
      

      这篇关于如何在Aptana Studio 3.0.9中使用bundle exec运行调试器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆