我开发了一个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>'
答案 0 :(得分:1)
将require "aescrypt"
放入engine.rb