这个写法有错?
module GuPiao
module APIEntities
class User < Grape::Entity
expose :_id, :name, :login, :location
end
class Topic < Grape::Entity
end
end
end
/Users/stephen/gupiao/lib/api/entities.rb:3:in `<module:APIEntities>': uninitialized constant Grape::Entity (NameError)
from /Users/stephen/gupiao/lib/api/entities.rb:2:in `<module:GuPiao>'
from /Users/stephen/gupiao/lib/api/entities.rb:1:in `<top (required)>'
from /Users/stephen/gupiao/lib/api.rb:1:in `<top (required)>'
from /Users/stephen/gupiao/config/routes.rb:2:in `block in <top (required)>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:282:in `instance_exec'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:282:in `eval_block'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/actionpack-3.2.7/lib/action_dispatch/routing/route_set.rb:260:in `draw'
from /Users/stephen/gupiao/config/routes.rb:1:in `<top (required)>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:40:in `block in load_paths'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:40:in `each'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:40:in `load_paths'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:16:in `reload!'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:26:in `block in updater'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.7/lib/active_support/file_update_checker.rb:78:in `call'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/activesupport-3.2.7/lib/active_support/file_update_checker.rb:78:in `execute'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:27:in `updater'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/routes_reloader.rb:7:in `execute_if_updated'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application/finisher.rb:66:in `block in <module:Finisher>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/initializable.rb:30:in `instance_exec'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/initializable.rb:30:in `run'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/initializable.rb:55:in `block in run_initializers'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/initializable.rb:54:in `each'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/initializable.rb:54:in `run_initializers'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/application.rb:136:in `initialize!'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Users/stephen/gupiao/config/environment.rb:5:in `<top (required)>'
from /Users/stephen/gupiao/config.ru:4:in `block in <main>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:51:in `instance_eval'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:51:in `initialize'
from /Users/stephen/gupiao/config.ru:1:in `new'
from /Users/stephen/gupiao/config.ru:1:in `<main>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:40:in `eval'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/builder.rb:40:in `parse_file'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:200:in `app'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/commands/server.rb:46:in `app'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/commands/server.rb:70:in `start'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/commands.rb:55:in `block in <top (required)>'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
from /Users/stephen/.rvm/gems/ruby-1.9.3-p125/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'