我刚开始学习如何编程,但使用 Ubuntu 已经有几年了,所以我对研究问题和错误非常熟悉,但要么这个领域对我来说太新,要么我真的找不到任何具体的答案。
我正在参加 ruby on rails 介绍课程,到了必须安装设计 gem 的地步,这就是我犯错误的地方。
在按照设计 github 页面上的说明操作时,我不小心输入了:
rails generate devise install
代替
rails generate devise:install
现在,每当我尝试加载
导轨
我收到此错误消息:
/home/amer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:230:in `block in constantize': uninitialized constant Install (NameError)
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:229:in `each'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/inflector/methods.rb:229:in `constantize'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise.rb:256:in `get'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:77:in `to'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:72:in `modules'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:89:in `routes'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:156:in `default_used_route'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/mapping.rb:66:in `initialize'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise.rb:290:in `new'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise.rb:290:in `add_mapping'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/rails/routes.rb:208:in `block in devise_for'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/rails/routes.rb:207:in `each'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/devise-2.1.2/lib/devise/rails/routes.rb:207:in `devise_for'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config/routes.rb:3:in `block in <top (required)>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/actionpack-3.2.9/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config/routes.rb:1:in `<top (required)>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `each'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/file_update_checker.rb:78:in `call'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/activesupport-3.2.9/lib/active_support/file_update_checker.rb:78:in `execute'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:27:in `updater'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `instance_exec'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/initializable.rb:30:in `run'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/initializable.rb:55:in `block in run_initializers'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `each'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/initializable.rb:54:in `run_initializers'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/application.rb:136:in `initialize!'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config/environment.rb:5:in `<top (required)>'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config.ru:4:in `block in <main>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config.ru:1:in `new'
from /home/amer/Documents/Rails_Projects/omrails/omrails1/config.ru:1:in `<main>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands/server.rb:46:in `app'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands/server.rb:70:in `start'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands.rb:50:in `tap'
from /home/amer/.rvm/gems/ruby-1.9.3-p327/gems/railties-3.2.9/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
在此处发布之前,我尝试重新安装 ruby 1.9.3。使用 rvm。我尝试使用
rvm gemset empty [gemset_name]
正如RVM 中所述:卸载 gemset 的所有 gem,但这也没有真正的帮助。
我该怎么办?谁能向我解释这里发生了什么?