将我的Rails安装升级到OS X上的Rails 3之后,我在使用Mongrel运行Rails 2.x开发站点时遇到了问题.WEBrick似乎工作,但我真的希望有很好的Mongrel输出用于调试.
跑完后$ script/server我明白了:
/Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load': no such file to load -- mongrel_rails (MissingSourceFile)
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:49:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:49:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
from /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:49:in `gem_original_require'
Run Code Online (Sandbox Code Playgroud)
到目前为止,这是我尝试过的:
$ sudo gem update system
Run Code Online (Sandbox Code Playgroud)
$ sudo gem update
Run Code Online (Sandbox Code Playgroud)
$ sudo gem uninstall mongrel
Run Code Online (Sandbox Code Playgroud)
$ sudo gem install mongrel --include-dependencies
Run Code Online (Sandbox Code Playgroud)
$ which mongrel_rails
Run Code Online (Sandbox Code Playgroud)
→ /usr/bin/mongrel_rails
$ mongrel_rails start
Run Code Online (Sandbox Code Playgroud)
→成功,但没有标准
$ …Run Code Online (Sandbox Code Playgroud) 我不是一个庞大的PHP家伙,但我可以搞砸任何事情.我过去曾经在一些php应用程序上工作,但我真的不记得了.作为一个朋友的恩惠,我试图帮助他们在PHP应用程序中追踪问题.我把它设置在我的机器上(osx.6)php Entropy 5.3.3 apache.
它似乎运行大部分,但我有管理员登录的问题...注意到它没有登录,给出错误或任何东西.
无论如何,我的具体问题涉及我正在查看登录错误被转储到视图的行:
即使我设置值明确,也不输出任何内容,例如:
<?php $problem="There is a problem."?>
<?= $problem ?>
Run Code Online (Sandbox Code Playgroud)
但是,如果我说:
<?php $problem="There is a problem."?>
<?php echo ($problem); ?>
Run Code Online (Sandbox Code Playgroud)
这让我想知道我在本地测试应用程序的问题是由于某些mod未加载,还是php版本问题?
这些语法之间的差异是什么,为什么一个工作而另一个不工作?
我试过谷歌搜索...但我想我今天不是很敏锐......