Rails Engine AESCRYPT gem

时间:2014-09-16 09:31:21

标签: ruby-on-rails ruby-on-rails-4 rails-engines

我开发了一个rails引擎应用程序(可安装的引擎)。在引擎gemspec文件中,我添加了s.add_dependency "aescrypt" 之后我在rails控制台中给了bundle install我按照https://github.com/Gurpartap/aescrypt“>链接的步骤进行了操作,但是显示错误

NameError: uninitialized constant AESCrypt\
from (irb):4
    from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.6/lib/rails/commands/console.rb:90:in `start'
    from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.6/lib/rails/commands/console.rb:9:in `start'
    from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:69:in `console'
    from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.6/lib/rails/commands/commands_tasks.rb:40:in `run_command!'
    from /Users/user/.rvm/gems/ruby-1.9.3-p547/gems/railties-4.1.6/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:8:in `require'
    from bin/rails:8:in `<main>'

1 个答案:

答案 0 :(得分:1)

require "aescrypt"放入engine.rb