undefined method `camel_case'
tianjianyong opened this issue · 4 comments
When I run some rake tasks, log this error.
I use the newest version of goliath:
remote: git://github.com/postrank-labs/goliath.git
revision: 1bc9b41
[Error log]
~/.rvm/gems/ruby-2.0.0-p247/bundler/gems/goliath-1bc9b4109e95/lib/goliath/application.rb:95:in run!': undefined method
camel_case' for Goliath::Application:Module (NoMethodError)
from ~/.rvm/gems/ruby-2.0.0-p247/bundler/gems/goliath-1bc9b4109e95/lib/goliath/application.rb:133:in `block in module:Goliath'
It happens only if you haven't any instance of Goliath:Api, try add to you script
class Hello < Goliath::API
def response(env)
[200, {}, "Hello World"]
end
end
This happens when you have gem 'goliath'
in your Gemfile
And your rake
has executed require 'rubygems'; require 'bundler/setup'
.
ok, it looks like gem 'goliath'
combined with Bundler.require
or Bundler.setup
was the culprit.
in your Gemfile
, use gem 'goliath', :require => false
solves the problem.
Thanks!