我刚刚更新到Ruby 1.9.3p0和Rails 3.1.1.现在,当我尝试启动服务器时,它抱怨我应该安装ruby-debug,即使它已经安装.
% rails server --environment=development --debug
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Exiting
Run Code Online (Sandbox Code Playgroud)
在我的Gemfile中我有
# see: http://stackoverflow.com/questions/1083451/debugging-in-ruby-1-9
gem 'ruby-debug-base19', "0.11.24"
gem 'ruby-debug19', "0.11.6"
Run Code Online (Sandbox Code Playgroud)
是否可以使用最新版本的Ruby运行调试?
我想使用IRB运行脚本然后给我一个交互式提示.我python -i xy.py在Python中执行此操作,但irb xy.rb在执行后退出.
> python --help
-i When a script is passed as first argument or the -c option is
used, enter interactive mode after executing the script or the
command
Run Code Online (Sandbox Code Playgroud)