开发者

Rails Development Log

开发者 https://www.devze.com 2023-02-08 13:54 出处:网络
I\'m in Chapter 6 of the RoR Tutorial and can\'t seem to get the command \'tail -f log/development.log\' to work. Using Mac OS X 10.6.6, Ruby 1.9.2, Rails 3.0.3 with RVM. I\'m trying to run it in a sa

I'm in Chapter 6 of the RoR Tutorial and can't seem to get the command 'tail -f log/development.log' to work. Using Mac OS X 10.6.6, Ruby 1.9.2, Rails 3.0.3 with RVM. I'm trying to run it in a sanboxed Rail开发者_StackOverflow中文版s console, here's the output of what's going on:

Trenton-Scotts-MacBook-Air:sample_app TTS$ rails c --sandbox
Loading development environment in sandbox (Rails 3.0.3)
Any modifications you make will be rolled back on exit
ruby-1.9.2-p136 :001 > tail -f log/development.log
SyntaxError: (irb):1: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '('
tail -f log/development.log
           ^
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/console.rb:44:in `start'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands/console.rb:8:in `start'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/railties-3.0.3/lib/rails/commands.rb:23:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'
ruby-1.9.2-p136 :002 > 

Any thoughts?


Tail is not a Ruby command. You should run it directly in terminal:

$ tail -f logs/development.log
#=> output
#=> ctrl+c
$ rails c --sandbox


You are inside the irb console. exit from irb console and try it in your shell


tail is a UNIX command. You need to quit ruby console first and then execute it in shell.
Or you could simply open another shell window.

0

精彩评论

暂无评论...
验证码 换一张
取 消