gpt4 book ai didi

ruby-on-rails - Rails 开发日志

转载 作者:行者123 更新时间:2023-12-04 06:34:12 25 4
gpt4 key购买 nike

我在 RoR 教程的第 6 章中,似乎无法使命令“tail -f log/development.log”起作用。使用 Mac OS X 10.6.6、Ruby 1.9.2、Rails 3.0.3 和 RVM。我正在尝试在一个带沙盒的 Rails 控制台中运行它,这是正在发生的事情的输出:

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 >

有什么想法吗?

最佳答案

Tail 不是 Ruby 命令。您应该直接在终端中运行它:

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

关于ruby-on-rails - Rails 开发日志,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4909099/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com