错误在Windows XP上使用mongrel启动rails应用程序

时间:2011-02-06 20:22:39

标签: ruby-on-rails windows-xp mongrel

我正在尝试在windows xp上使用mongrel启动rails应用程序。

我认为以下错误是针对特定版本的,但无法确切地指出遗漏的内容(可能忽略了某个宝石或不兼容的版本?)

我的红宝石版本 C:\ ruby​​ -v
ruby 1.9.2p136(2010-12-25)[i386-mingw32]

*本地宝石*

摘要(1.0.0)
actionmailer(3.0.4.rc1,3.0.3,2.2.3)
actionpack(3.0.4.rc1,3.0.3,2.2.3)
activemodel(3.0.4.rc1,3.0.3)
activerecord(3.0.4.rc1,3.0.3,2.2.3)
activeresource(3.0.4.rc1,3.0.3,2.2.3)
activesupport(3.0.4.rc1,3.0.3,2.2.3)
arel(2.0.7)
建造者(2.1.2)
捆绑(1.0.10)
cgi_multipart_eof_fix(2.5.0)
erubis(2.6.6)
gem_plugin(0.2.3)
i18n(0.5.0)
邮件(2.2.15)
哑剧型(1.16)
minitest(1.6.0)
mongrel(1.2.0.pre2 x86-mingw32,1.1.5 x86-mingw32)
mongrel_service(0.4.0)
多语言(0.3.1)
机架(1.2.1)
机架式(0.6.13)
机架测试(0.5.7)
rails(3.0.4.rc1,3.0.3,2.2.3)
铁路(3.0.4.rc1,3.0.3)
耙(0.8.7)
rdoc(2.5.8)
rubygems-update(1.5.0)
托尔(0.14.6)
树梢(1.4.9)
tzinfo(0.3.24)

在我的工作目录中,我尝试使用以下命令启动应用程序:

mongrel_rails start -e development -b 127.0.0.1 -p 3000

错误是:
C:\ myApp> mongrel_rails start -e development -a 127.0.0.1 -p 3000
**启动Mongrel收听127.0.0.1:3000
**使用开发环境启动Rails ......

  

:29:require': no such file to load--
C:/myApp/config/../vendor/rails/railties/lib/initializer (LoadError)
from <internal:lib/rubygems/custom_require>:29:in
要求'           来自C:/myApp/config/boot.rb:45:in load_initializer'
from C:/myApp/config/boot.rb:38:in
运行'
          来自C:/myApp/config/boot.rb:11:在boot!'
from C:/myApp/config/boot.rb:109:in
'中           来自:29:require'
from <internal:lib/rubygems/custom_require>:29:in
要求'           来自C:/myApp/config/environment.rb:11:在<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in
中需要'
          来自:29:在require'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ lib/mongrel/rails.rb:147:in
rails'中           来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/   bin / mongrel_rails:116:block (2 levels) in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ lib/mongrel/configurator.rb:149:in
来电'           来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/   lib / mongrel / configurator.rb:149:在运行中的listener'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ bin/mongrel_rails:102:in
块中           来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/   lib / mongrel / configurator.rb:50:在call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ lib/mongrel/configurator.rb:50:in
初始化'
          来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/   bin / mongrel_rails:86:在new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ bin/mongrel_rails:86:in
运行中           来自C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/   lib / mongrel / command.rb:210:在run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/ bin/mongrel_rails:282:in
'中           来自C:/ Ruby192 / bin / mongrel_rails:19:in load'
from C:/Ruby192/bin/mongrel_rails:19:in
'

关于如何解决这个问题的任何想法或方向都会非常感激。如果我遗漏了文件或宝石,或者它是版本冲突,则不清楚是哪一个。

同样考虑到安装了同一个gem的不同版本,我怎么能在mongrel上启动rails应用程序,准确指出我想要使用哪个版本?

谢谢!

1 个答案:

答案 0 :(得分:0)

请你粘贴你的宝石文件的内容吗?

确保您拥有:

gem 'mongrel', '>= 1.2.0.pre2'

然后运行bundle install来更新您的宝石。

运行服务器:rails server mongrel