Rails Development Log

I'm in chapter 6 of the RoR tutorial and can't get the tail -f log / development.log command to work. Using Mac OS X 10.6.6, Ruby 1.9.2, Rails 3.0.3 with RVM. I am trying to run it in the sanboxed Rails console, here is the conclusion about what is happening:

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?

+5
source share
3 answers

The tail is not a ruby ​​team. You must run it directly in the terminal:

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

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

+4
source

tail - UNIX. ruby, .
.

+3
source

All Articles