对于宝石来说,我很绿。所以这可能是一个非常明显的错误。但真的可以使用一些帮助。
当我在irb上尝试“require'actionmailer'”时,我收到以下错误。
irb(main):001:0> require 'actionmailer'
LoadError: cannot load such file -- actionmailer
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from C:/Ruby200/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
`require'
from (irb):1
from C:/Ruby200/bin/irb:12:in `<main>'
这是gem env
的输出 C:\Users\xxxyyyy\RubyPrac>gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.0.14
- RUBY VERSION: 2.0.0 (2014-02-24 patchlevel 451) [i386-mingw32]
- INSTALLATION DIRECTORY: C:/Ruby200/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: C:/Ruby200/bin/ruby.exe
- EXECUTABLE DIRECTORY: C:/Ruby200/bin
- RUBYGEMS PLATFORMS:
- ruby
- x86-mingw32
- GEM PATHS:
- C:/Ruby200/lib/ruby/gems/2.0.0
- C:/Users/xxxxyyyy/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
请帮忙。 附:我正在使用Windows 7机器。
答案 0 :(得分:1)
错字。假设你安装了它(所以你有轨道或单独安装),它应该是:
require 'action_mailer'
PS。不要在带红宝石的窗户上工作。它只会是痛苦。