在OSX上运行古老的Rails 1.2项目失败了

时间:2012-07-03 16:02:56

标签: ruby-on-rails webrick

我正在尝试在我的OSX上运行1.2 rails项目,但是我遇到了这个我以前从未见过的错误,我无法谷歌解决方案,任何提示?

Mac@MKK.local:~/projects/rails/ktb/script$./server -p 3001
=> Booting WEBrick...
/Users/Mac/.rvm/gems/ruby-1.8.7-p370@tjener/gems/transaction-simple-1.4.0.2/lib/transaction/simple.rb:41: warning: already initialized constant Messages
/Users/Mac/.rvm/gems/ruby-1.8.7-p370@tjener/gems/transaction-simple-1.4.0.2/lib/transaction/simple.rb:46: warning: already initialized constant TRANSACTION_SIMPLE_VERSION
/Users/Mac/.rvm/gems/ruby-1.8.7-p370@tjener/gems/transaction-simple-1.4.0.2/lib/transaction/simple.rb:469: warning: already initialized constant SKIP_TRANSACTION_VARS
=> Rails application started on http://0.0.0.0:3001
=> Ctrl-C to shutdown server; call with --help for options
[2012-07-03 17:59:05] INFO  WEBrick 1.3.1
[2012-07-03 17:59:05] INFO  ruby 1.8.7 (2012-06-29) [i686-darwin11.4.0]
[2012-07-03 17:59:05] INFO  WEBrick::HTTPServer#start: pid=16431 port=3001
#<ArgumentError: Anonymous modules have no name to be referenced by>
["../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:404:in `to_constant_name'", 
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:214:in `qualified_name_for'", 
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:476:in `const_missing'", 
"../config/../vendor/rails/railties/lib/dispatcher.rb:117:in `reset_after_dispatch'", 
"../config/../vendor/rails/railties/lib/dispatcher.rb:51:in `dispatch'", 
"../config/../vendor/rails/railties/lib/webrick_server.rb:113:in `handle_dispatch'", 
"../config/../vendor/rails/railties/lib/webrick_server.rb:79:in `service'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'",
 "/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'",
 "/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in `start'",
 "/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:95:in `start'",
 "/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:92:in `each'", "/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:92:in `start'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:23:in `start'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/1.8/webrick/server.rb:82:in `start'", "../config/../vendor/rails/railties/lib/webrick_server.rb:63:in `dispatch'", 
"../config/../vendor/rails/railties/lib/commands/servers/webrick.rb:59", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'", 
"/Users/Mac/.rvm/rubies/ruby-1.8.7-p370/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'", 
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'",
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:342:in `new_constants_in'", 
"../config/../vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require'", 
"../config/../vendor/rails/railties/lib/commands/server.rb:39", 
"./server:3:in `require'", 
"./server:3"]
[2012-07-03 17:59:08] ERROR `/' not found.

2 个答案:

答案 0 :(得分:0)

试试这个

$ cd ~/projects/rails/ktb
$ ./script/server -p 3001

答案 1 :(得分:0)

原来这个项目出了问题,我再次下载了它,开箱即用......