#6 楼 @kamechen 按照你的建议我修改了下,uninitialized constant App (NameError)。不知是不是我有什么地方配置的不对. config.ru 文件
# This file is used by Rack-based servers to start the application.
require ::File.expand_path('../config/environment', __FILE__)
run Rongyi::Application
if Rails.env.production?
map '/grape' do
run App.instance
end
end
routes.rb 文件
require 'api'
mount App.instance => '/grape' unless Rails.env.production?
application.rb 文件
config.autoload_paths += %W(#{config.root}/app/grape)
哈哈,学习了……
@kafka0102 推酷帐号:lytsing2002。。谢了啊!