On Feb 29, 5:30 pm, John Lane <li...@ruby-forum.com> wrote:
> Hi list,
>
>
> wrong argument type Class (expected Module)
>
> Application Trace | Framework Trace | Full Trace
>
> lib/mymodule.rb:65:in `include'
> lib/mymodule.rb:65
> app/controllers/application.rb:8
>
> The code snippet referred to is a module of the form:
>
> 60 module Mymodule
> 61
> 62 require 'openssl'
> 63 include OpenSSL
> 64 include PKey
> 65 include Cipher
>
> So I suspect I have something wrong with my OpenSSL in rvm, but I don't
> know what.
>
>> require "openssl"
=> true
>> module Foo
| include OpenSSL::Cipher
| end
TypeError: wrong argument type Class (expected Module)
(ripl):5:in `include'
(ripl):5:in `<module:Foo>'
(ripl):4:in `<main>'
You're trying to include a class into a module, OpenSSL::Cipher is a
class while PKey and OpenSSL itself is a module.
--
Luis Lavena
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment