简体   繁体   English

Rails服务器命令无法正常运行Ubuntu 10.04

[英]Rails server command not functioning ubuntu 10.04

I have installed rvm ruby 1.9.3 and rails 3.0.5, and am trying right now to enter the "rails server" command line but this is what I get: 我已经安装了rvm ruby​​ 1.9.3和rails 3.0.5,现在正在尝试输入“ rails server”命令行,但这是我得到的:

badr@Badoo:~/rails_projects/first_app$ rails s
/home/badr/rails_projects/first_app/config/application.rb:7:in `<top (required)>': undefined method `groups' for Rails:Module (NoMethodError)
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:28:in `require'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:28:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:27:in `tap'
    from /usr/local/rvm/gems/ruby-1.9.3-p429/gems/railties-3.0.5/lib/rails/commands.rb:27:in `<top (required)>'
    from script/rails:6:in `require'
    from script/rails:6:in `<main>'

I have been following this tutorial . 我一直在关注本教程 I'm using ubuntu 12.04 lts and I guess I don't need to tell you that I'm a newbie... 我正在使用ubuntu 12.04 lts,我想不需要告诉你我是新手...

I really don't know what's wrong (railties gem? the rvm?), I've been googling for a solution the whole day. 我真的不知道出什么问题了(raillet gem?rvm?),我整天都在寻找解决方案。

Thanks in advance 提前致谢

First. 第一。 update your rails to the current stable version 3.2.13 and see if the error is gone (It will be) also update your ruby to 2 将您的rails更新到当前的稳定版本3.2.13,看看错误是否消失了(它将是)还将ruby更新为2


else: 其他:

See if this works: 查看是否可行:

https://stackoverflow.com/a/13275655/1379394 https://stackoverflow.com/a/13275655/1379394

In config/application.rb substitute config/application.rb替代

if defined?(Bundler)
Bundler.require(*Rails.groups(:assets => %w(development test)))
end

With

Bundler.require(:default, Rails.env) if defined?(Bundler)

And another question. 还有一个问题。 why are you using rails 3.0.5? 为什么要使用Rails 3.0.5? 3.2.13 released Mar 18, 2013 2013年3月18日发布3.2.13

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Ubuntu 10.04上安装rails时出错 - Error Installing rails on Ubuntu 10.04 在Ubuntu 10.04上检查Rails版本时出错 - Error in checking rails version on ubuntu 10.04 Ruby on Rails:Ubuntu 10.04上的自动测试通知 - Ruby on Rails : Autotest-notification on Ubuntu 10.04 在Ubuntu 10.04中安装Rails期间出错 - Error during Installing Rails in Ubuntu 10.04 在Ubuntu 10.04的Rails 3.2.10中安装capybara-webkit 1.0.0时出现问题 - Problems installing capybara-webkit 1.0.0 in Rails 3.2.10 on Ubuntu 10.04 在Ubuntu 10.04 Lucid box上使用Nginx实时发送Rails应用 - Sending Rails app live with Nginx on Ubuntu 10.04 Lucid box 将Rails应用程序部署到Ubuntu 10.04 VPS时的Libv8错误 - Libv8 error when deploying a rails app to a Ubuntu 10.04 VPS 在Ubuntu 10.04上使用Bundler + Capistrano + Rails 3时,MySql安装失败 - MySql installation failed using Bundler + Capistrano + Rails 3 on Ubuntu 10.04 Ubuntu 10.04上的Rails 3.2应用程序,带有Plesk 11,nginx作为反向代理和Apache - Rails 3.2 app on Ubuntu 10.04 with Plesk 11, nginx as reverse proxy and apache RAIL_ENV =生产rake db:schema:使用rails 3.1.0和ubuntu 10.04加载中止 - RAIL_ENV=production rake db:schema:load aborted with rails 3.1.0 and ubuntu 10.04
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM