为Ruby on Rails设计gem install [英] devise gem install for Ruby on Rails

查看:110
本文介绍了为Ruby on Rails设计gem install的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



刚刚开始学习Ruby on Rails,我正在尝试安装用于创建登录/登录课程的设计宝石,但我不断收到以下消息。 >任何人都可以帮忙吗?并随时纠正我如何提问。

  alexs-air:pinteresting alexkwon $ rails generate devise:install 
/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in`method_missing':未定义的安装方法`devise'(call' Install.connection'建立连接):Class(NoMethodError)
from /Users/alexkwon/Desktop/pinteresting/app/models/install.rb:4:in`< class:Install>'
from /Users/alexkwon/Desktop/pinteresting/app/models/install.rb:1:in`< top(required)>'
from /Users/alexkwon/.rvm/gems/ruby-2.1 .2 / gems / activesupport-4.1.1 / lib / active_support / dependencies.rb:443:在`load'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport- 4.1.1 / lib / active_support / dependencies.rb:443:位于load_file中的block中
来自/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib /active_support/dependencies.rb:633:in`new_constan ts_in'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:442:in`load_file'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:342:in'require_or_load'
from /Users/alexkwon/.rvm /gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:480:in`load_missing_constant'
from /Users/alexkwon/.rvm/gems/ruby-2.1。 2 / gems / activesupport-4.1.1 / lib / active_support / dependencies.rb:180:在`const_missing'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1 .1 / lib / active_support / inflector / methods.rb:238:在`const_get'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/ active_support / inflector / methods.rb:238:在`block in constantize'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector /methods.rb:236:从`/ Users / ale'中的每个'
' xkwon / .rvm / gems / ruby​​-2.1.2 / gems / activesupport-4.1.1 / lib / active_support / inflector / methods.rb:236:在`inject'中注入
/Users/alexkwon/.rvm/ gems / ruby​​-2.1.2 / gems / activesupport-4.1.1 / lib / active_support / inflector / methods.rb:236:在`constantize'
from /Users/alexkwon/.rvm/gems/ruby-2.1 .2 / gems / activesupport-4.1.1 / lib / active_support / dependencies.rb:552:在`get'
从/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport- 4.1.1 / lib / active_support / dependencies.rb:583:在`constantize'中$ / $ b / from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise .rb:297:在`get'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:77:in`从/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:72:in'modules'
从'
' /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:89:in`routes'
from /Users/alexkwon/.rvm /gems/ruby-2.1.2/gems/devise-3.2.4/lib /devise/mapping.rb:156:in`default_used_route'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb: 66:在`initialize'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in`new'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in'add_mapping'
from /Users/alexkwon/.rvm /gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in`block in devise_for'
from /Users/alexkwon/.rvm/gems/ ruby-2.1.2 / gems / devise-3.2.4 / lib / devise / rails / routes.rb:220:在`each'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2 /gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in`devise_for'
from /Users/alexkwon/Desktop/pinteresting/config/routes.rb:2:in`block位于/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335中的< top(required)>'
:来自/ Users / alexkwon的`instance_exec'
/ .rvm / gems / ruby​​-2.1.2 / gems / actionpack-4.1.1 / lib / action_dispatch / routing / route_set.rb:335:在`eval_block'
from /Users/alexkwon/.rvm/gems/ ruby-2.1.2 / gems / actionpack-4.1.1 / lib / action_dispatch / routing / route_set.rb:313:从/Users/alexkwon/Desktop/pinteresting/config/routes.rb中'draw'
: 1:在/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb中的< top(required)>'
中: 241:在`load'
/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in`block in load '
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in`load_dependency'
from /用户/ alexkwon / .rvm / gems / ruby​​-2.1.2 / gems / activesupport-4.1.1 / lib / active_support / dependencies.rb:241:在`load'
from /Users/alexkwon/.rvm/ gem / ruby​​-2.1.2 / gems / railties-4.1.1 / lib / rails / application / routes_reloader.rb:40:在`block in load_pat hs'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in`each'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in`load_paths'
from / Users / alexkwon / .rvm / gems / ruby​​-2.1.2 / gems / railties-4.1.1 / lib / rails / application / routes_reloader.rb:16:在`reload!'
from /Users/alexkwon/.rvm /gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:26:in`block in updater'
from /Users/alexkwon/.rvm/gems/ ruby-2.1.2 / gems / activesupport-4.1.1 / lib / active_support / file_update_checker.rb:75:在`call'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems /activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in从/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/执行
lib / rails / application / routes_reloader.rb:27:在`updater'中
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4 .1.1 / lib / rails / application / routes_reloader.rb:7:位于/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/的`execute_if_updated'
中rails / application / finisher.rb:71:在< module中的块:Finisher>'从/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/开始
lib / rails / initializable.rb:30:在`instance_exec'中
来自/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb :30:在`run'中运行
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in`block in run_initializers'
from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in`block in tsort_each'
from / Users /alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in`each_strongly_connected_component中的block(2个级别)'from /Users/alexkwon/.rvm中的
/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in`each_strongly_connected_component_from'
from /Users/alexkwon/.rv m / rubies / ruby​​-2.1.2 / lib / ruby​​ / 2.1.0 / tsort.rb:347:位于```each_strongly_connected_component'块中'
from /Users/alexkwon/.rvm/rubies/ruby-2.1.2 /lib/ruby/2.1.0/tsort.rb:345:in from /Users/alexkwon/.rvm/rubies-2.1.2/lib/ruby/2.1.0/tsort中的每个'
'。 rb:345:在'call'中
来自/Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in`each_strongly_connected_component'
from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in`tsort_each'
from /Users/alexkwon/.rvm/rubies /ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in`tsort_each'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties- 4.1.1 / lib / rails / initializable.rb:54:在`run_initializers'中$ / $ b / from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails /application.rb:288:in`initialize!'
from /Users/alexkwon/Desktop/pinteresting/config/environment.rb:5:in`< top(required)>'
from /Users/alexkwon/.rvm/gems/ruby-2。 1.2 / gems / activesupport-4.1.1 / lib / active_support / dependencies.rb:247:在'require'中
来自/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1 .1 / lib / active_support / dependencies.rb:247:在`block in require'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/ active_support / dependencies.rb:232:来自/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247的`load_dependency'
:在`require'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in`require_environment!'$ b / b from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:147:in`require_application_and_environment!'
from / Users / alexaqwon / .rvm /宝石/红宝石2.1.2 /宝石/ railties-4.1.1 / LIB /轨道/ comman ds / commands_tasks.rb:51:从/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb生成
:40:在`run_command!'
from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands.rb:17:in`< ; top(required)>'bin / rails中的'
:8':'require'
从bin / rails:8:在< main>'


解决方案

欢迎来到Rails人。



我知道这个社区已经在设计宝典上了。现实情况是,Devise是一款高级认证应用程序,它是一个宝石。



如果你正在学习,并且你需要认证,一些名叫Ryan Bates的超级怪人会让你迷上关于基本认证的教程和屏幕录像将完全按照您的需要进行工作,并且您将了解发生了什么事情:

http://railscasts.com/episodes/250-authentication-from-scratch



WHABAM!



注意基于rails 3.检查rails和ruby版本之间的差异,如果在遵循方向时遇到问题。如果您确实收到错误,那么这条道路将进一步部署您的应用程序。

当您需要它提供的功能,Rails和自信时,您可以实现JoséValim在Crafting Rails应用程序一书中找到的想法。他是Devise的主要贡献者之一,因此您可以深入了解他的思维过程。


just started learning Ruby on Rails, I'm trying to install the devise gem for creating a login/signin lesson, but I keep getting the following messages..

Could anyone help please? and feel free to correct me on how i'm asking the questions. New to this community and would love to be involved.

alexs-air:pinteresting alexkwon$ rails generate devise:install
/Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activerecord-4.1.1/lib/active_record/dynamic_matchers.rb:26:in `method_missing': undefined method `devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
    from /Users/alexkwon/Desktop/pinteresting/app/models/install.rb:4:in `<class:Install>'
    from /Users/alexkwon/Desktop/pinteresting/app/models/install.rb:1:in `<top (required)>'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `load'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:443:in `block in load_file'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:633:in `new_constants_in'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:442:in `load_file'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:342:in `require_or_load'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:480:in `load_missing_constant'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:180:in `const_missing'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `const_get'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:238:in `block in constantize'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `each'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `inject'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/inflector/methods.rb:236:in `constantize'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:552:in `get'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:583:in `constantize'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:297:in `get'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:77:in `to'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:72:in `modules'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:89:in `routes'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:156:in `default_used_route'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/mapping.rb:66:in `initialize'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in `new'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise.rb:331:in `add_mapping'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:221:in `block in devise_for'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `each'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/devise-3.2.4/lib/devise/rails/routes.rb:220:in `devise_for'
    from /Users/alexkwon/Desktop/pinteresting/config/routes.rb:2:in `block in <top (required)>'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `instance_exec'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:335:in `eval_block'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/actionpack-4.1.1/lib/action_dispatch/routing/route_set.rb:313:in `draw'
    from /Users/alexkwon/Desktop/pinteresting/config/routes.rb:1:in `<top (required)>'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `block in load'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:241:in `load'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `each'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:40:in `load_paths'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:16:in `reload!'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:26:in `block in updater'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `call'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/file_update_checker.rb:75:in `execute'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:27:in `updater'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application/finisher.rb:71:in `block in <module:Finisher>'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `instance_exec'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:30:in `run'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:55:in `block in run_initializers'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:226:in `block in tsort_each'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:348:in `block (2 levels) in each_strongly_connected_component'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:427:in `each_strongly_connected_component_from'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:347:in `block in each_strongly_connected_component'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `call'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:345:in `each_strongly_connected_component'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:224:in `tsort_each'
    from /Users/alexkwon/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/tsort.rb:205:in `tsort_each'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/initializable.rb:54:in `run_initializers'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:288:in `initialize!'
    from /Users/alexkwon/Desktop/pinteresting/config/environment.rb:5:in `<top (required)>'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `block in require'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:232:in `load_dependency'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.1/lib/active_support/dependencies.rb:247:in `require'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/application.rb:264:in `require_environment!'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:147:in `require_application_and_environment!'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:133:in `generate_or_destroy'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:51:in `generate'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/alexkwon/.rvm/gems/ruby-2.1.2/gems/railties-4.1.1/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

解决方案

Welcome to Rails man.

I know the community is all up on the devise gem. The reality is that Devise is an advanced authentication app that's a gem.

If you're learning, and you need authentication, some super geek named Ryan Bates hooked you up with a tutorial and screencast on basic authentication that will work exactly how you need it, and you will understand what's going on:

http://railscasts.com/episodes/250-authentication-from-scratch

WHABAM!

Be mindful that is based on rails 3. Check the differences between rails, and ruby versions if you encounter problems while following directions. If you do get errors, still, this path will get your further to deploying that app of yours.

Come back to Devise when you need the features it provides, Rails, and confident you can implement ideas found in the book 'Crafting Rails Application' by José Valim. He's one of the main contributors of Devise, so you'll get insight on his thought process.

这篇关于为Ruby on Rails设计gem install的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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