Rails 3 library not loading until require

后端 未结 2 1125
攒了一身酷
攒了一身酷 2020-11-30 02:22

I\'m trying to load the Tokbox SDK in rails 3. I\'ve placed the library in my /lib directory, so currently my directory structure looks like so:

/lib
 &nb

2条回答
  •  失恋的感觉
    2020-11-30 02:33

    The autoloader will snake case the constant, so "OpenTok" would make the autoloader look for "open_tok.rb", not "opentok.rb". Try renaming lib/opentok.rb and it should work fine.

提交回复
热议问题