在 Windows XP 上使用 Mongrel 启动 Rails 应用程序时出错

发布于 2024-10-16 06:43:22 字数 3720 浏览 2 评论 0原文

我正在尝试在 Windows XP 上使用 Mongrel 启动 Rails 应用程序。

我相信以下错误是特定于版本的,但无法准确指出缺少的内容(可能忽略了 gem 或者不兼容的版本?)

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

* LOCAL GEMS *

摘要 (1.0.0)
Actionmailer(3.0.4.rc1、3.0.3、2.2.3)
动作包(3.0.4.rc1、3.0.3、2.2.3)
活动模型(3.0.4.rc1、3.0.3)
活动记录(3.0.4.rc1、3.0.3、2.2.3)
活动资​​源(3.0.4.rc1、3.0.3、2.2.3)
主动支持(3.0.4.rc1、3.0.3、2.2.3)
阿瑞尔 (2.0.7)
构建器 (2.1.2)
捆绑器 (1.0.10)
cgi_multipart_eof_fix (2.5.0)
埃鲁比斯 (2.6.6)
gem_plugin (0.2.3)
国际化 (0.5.0)
邮件 (2.2.15)
mime 类型 (1.16)
迷你测试(1.6.0)
杂种(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)
导轨(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 更新 (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 -edevelopment -a 127.0.0.1 -p 3000
** 从 127.0.0.1:3000 开始 Mongrel 监听
** 使用开发环境启动 Rails...

:29:in require': 没有要加载的文件--
C:/myApp/config/../vendor/rails/railties/lib/initializer (LoadError)
来自:29:in
require'
来自 C:/myApp/config/boot.rb:45:in load_initializer'
来自 C:/myApp/config/boot.rb:38:in
run'
来自 C:/myApp/config/boot.rb:11:in boot!'
来自 C:/myApp/config/boot.rb:109:in
'
来自:29:在 require'
来自:29:in
require'
来自 C:/myApp/config/environment.rb:11:in '
来自:29:in
require'
来自:29:在 require'
来自 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:in 运行中的块(2 级)
来自 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:in listener'
来自 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:in call'
来自 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:in 新'
来自 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:in run'
来自 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'
来自 C:/Ruby192/bin/mongrel_rails:19:in
'

如何解决此问题的任何想法或方向将不胜感激。如果我缺少文件或 gem,或者版本冲突,它不清楚是哪一个。

另外,考虑到安装的同一个 gem 上有不同的版本,我如何在 mongrel 上启动 Rails 应用程序并准确指定我想要使用的版本?

谢谢!

I am trying to launch a rails application with mongrel on windows xp.

I believe the following error is version-specific but cannot pinpoint exactly what is missing (a gem overlooked perhaps or an incompatible version?)

My ruby version
C:\ruby -v
ruby 1.9.2p136 (2010-12-25) [i386-mingw32]

* LOCAL GEMS *

abstract (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)
builder (2.1.2)
bundler (1.0.10)
cgi_multipart_eof_fix (2.5.0)
erubis (2.6.6)
gem_plugin (0.2.3)
i18n (0.5.0)
mail (2.2.15)
mime-types (1.16)
minitest (1.6.0)
mongrel (1.2.0.pre2 x86-mingw32, 1.1.5 x86-mingw32)
mongrel_service (0.4.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.7)
rails (3.0.4.rc1, 3.0.3, 2.2.3)
railties (3.0.4.rc1, 3.0.3)
rake (0.8.7)
rdoc (2.5.8)
rubygems-update (1.5.0)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.24)

In my working directory I attempt to start the app with this command:

mongrel_rails start -e development -b 127.0.0.1 -p 3000

The error is:
C:\myApp>mongrel_rails start -e development -a 127.0.0.1 -p 3000
** Starting Mongrel listening at 127.0.0.1:3000
** Starting Rails with development environment...

:29:in require': no such file to load--
C:/myApp/config/../vendor/rails/railties/lib/initializer (LoadError)
from <internal:lib/rubygems/custom_require>:29:in
require'
from C:/myApp/config/boot.rb:45:in load_initializer'
from C:/myApp/config/boot.rb:38:in
run'
from C:/myApp/config/boot.rb:11:in boot!'
from C:/myApp/config/boot.rb:109:in
'
from :29:in require'
from <internal:lib/rubygems/custom_require>:29:in
require'
from C:/myApp/config/environment.rb:11:in <top (required)>'
from <internal:lib/rubygems/custom_require>:29:in
require'
from :29:in 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'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:116:in 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
call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:149:in listener'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:102:in
block in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:in call'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/configurator.rb:50:in
initialize'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:in new'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:86:in
run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
lib/mongrel/command.rb:210:in run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/mongrel-1.2.0.pre2-x86-mingw32/
bin/mongrel_rails:282:in
'
from C:/Ruby192/bin/mongrel_rails:19:in load'
from C:/Ruby192/bin/mongrel_rails:19:in
'

Any ideas or direction on how to about resolving this will much appreciated.If I am missing a file or gem, or if it is a version conflict, it is not clear which one is it.

Also given the different versions on the same gem installed, how could I start the rails app on mongrel specifying exactly what versions I want to use?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

后eg是否自 2024-10-23 06:43:22

请粘贴您的 gem 文件的内容好吗?

确保您有:

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

然后运行 ​​bundle install 来更新您的 gem。

运行服务器:rails server mongrel

would you please paste the contents of your gem file?

make sure you have:

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

then run bundle install to update your gem.

run server: rails server mongrel

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文