为现有应用启动 RoR 服务器会出错 [英] Launching RoR server for an existing app gives error

查看:23
本文介绍了为现有应用启动 RoR 服务器会出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚完成了我的第一次 RoR 设置,并且创建了一个新的应用程序工作正常.但是当我想运行 rails 服务器时,我收到以下错误:

I just made my first setup of RoR, and creating a new application works fine. But when I want to run the rails server I get the following error:

C:/Ruby192/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.3/lib/delayed/yaml_ext.rb:30:in 'remove_method': 方法 'to_yaml' 未在类中定义 (名称错误)

C:/Ruby192/lib/ruby/gems/1.9.1/gems/delayed_job-2.1.3/lib/delayed/yaml_ext.rb:30:in 'remove_method': method 'to_yaml' not defined in Class (NameError)

我在 app 目录中运行了bundle install"并安装了所有必要的文件(但是有一些问题,但我排除了 gemfile 中有问题的 gem),最后一次 bundle install 说我已经成功安装了所有需要的包.

I ran the "bundle install" in the app directory and installed all the necessary files (with some problems however, but I excluded the gems with problems in the gemfile) and the last bundle install said that I have successfully installed all the needed packs.

我迷路了,我在互联网上找不到类似的错误.你能帮我吗?

I'm lost and I can't find a similar error on the internet. Can you help me?

编辑:我忘了提到我在使用新应用程序时没有问题.它正在运行一个与错误相关的现有(我没有构建,但对其他人工作正常).这是该应用的 gemfile:

EDIT: I forgot to mention that I'm not having a problem with a new application. It's running an existing one (that I didn't build, but works fine for others) that the error is related to. Here's the gemfile for that app:

source 'http://rubygems.org'

gem 'rails', '3.0.3'

gem 'mysql'

gem "haml", ">= 3.0.0"
gem "haml-rails"
gem 'simple_form'
gem 'delayed_job'
#gem 'auto_crawlers'
gem 'will_paginate', '~> 3.0.beta'

group :test do
  gem 'factory_girl_rails'
  gem 'mocha'
end
group :development do
  #gem "nifty-generators", "0.4.3", :git => "git://github.com/JonasNielsen/nifty-generators.git"
  gem 'fastercsv'

end
gem "mocha", :group => :test

您认为错误是因为我用#"遗漏了两个宝石吗?那些一开始引起了问题,我认为我不需要它们来测试应用程序中的一些细微更改(我必须修改一些视图)

Do you think the error is because I left out the two gems with "#" ? Those were causing problems at first, and I don't think I need them to test some minor changes in the app (some views that I have to modify)

推荐答案

这个问题正在被描述,并且应该在这里修复:https://github.com/collectiveidea/delayed_job/issuesearch?state=open&q=yaml#issue/194

The issue is being described, and supposedly fixed here: https://github.com/collectiveidea/delayed_job/issuesearch?state=open&q=yaml#issue/194

这篇关于为现有应用启动 RoR 服务器会出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆