ruby-grape / grape-on-padrino Goto Github PK
View Code? Open in Web Editor NEWGrape API mounted on the Padrino web framework.
Grape API mounted on the Padrino web framework.
I've tried running this example using the latest release of Grape, however rake routes
fails with:
method_missing': undefined method request_methods'
Full stack trace below...
Any suggestions on how to fix?
Cheers
padrino rake routes
'
=> Executing Rake routes ...
WARNING! In Padrino >= 0.14.0 cli commandpadrino rake
will NOT add
'./lib' folder to $LOAD_PATH. Please alter yourrequire
calls accordingly
if you depend on this behavior.
DEVEL - 11/Feb/2017 15:15:23 LOADING (0.0123s) /Users/gavinw/scratch/grape-on-padrino/api/api.rb
DEVEL - 11/Feb/2017 15:15:23 Removed constant Acme::Api::Api from Acme::Api
DEVEL - 11/Feb/2017 15:15:23 Cyclic dependency reload for NameError: uninitialized constant Acme::Api::Ping
DEVEL - 11/Feb/2017 15:15:23 LOADING (0.0096s) /Users/gavinw/scratch/grape-on-padrino/api/ping.rb
DEVEL - 11/Feb/2017 15:15:23 LOADING (0.0080s) /Users/gavinw/scratch/grape-on-padrino/api/pingv2.rb
DEVEL - 11/Feb/2017 15:15:23 LOADING (0.0177s) /Users/gavinw/scratch/grape-on-padrino/api/api.rb
DEVEL - 11/Feb/2017 15:15:23 Loaded Padrino in 0.732267 seconds
/Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/grape-0.19.1/lib/grape/router/route.rb:27:inmethod_missing': undefined method
request_methods' for #Grape::Router::Route:0x007fb2319b3a80 (NoMethodError)
Did you mean? request_method
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/mounter.rb:133:inblock in named_routes' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/mounter.rb:132:in
map'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/mounter.rb:132:innamed_routes' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/cli/rake_tasks.rb:24:in
list_app_routes'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/cli/rake_tasks.rb:54:inblock (2 levels) in <top (required)>' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/cli/rake_tasks.rb:53:in
each'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/cli/rake_tasks.rb:53:inblock in <top (required)>' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:250:in
blockin execute'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:250:ineach' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:250:in
execute'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:194:inblockin invoke_with_call_chain' from /Users/gavinw/.rvm/rubies/ruby-2.3.3/lib/ruby/2.3.0/monitor.rb:214:in
mon_synchronize'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:187:ininvoke_with_call_chain' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/task.rb:180:in
invoke'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:152:ininvoke_task' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:108:in
block (2 levels) in top_level'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:108:ineach' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:108:in
block in top_level'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:117:inrun_with_threads' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/rake-12.0.0/lib/rake/application.rb:102:in
top_level'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/lib/padrino-core/cli/base.rb:23:inrake' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/thor-0.19.4/lib/thor/command.rb:27:in
run'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/thor-0.19.4/lib/thor/invocation.rb:126:ininvoke_command' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/thor-0.19.4/lib/thor.rb:369:in
dispatch'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/thor-0.19.4/lib/thor/base.rb:444:instart' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/gems/padrino-core-0.13.3.3/bin/padrino:9:in
<top (required)>'
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/bin/padrino:22:inload' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/bin/padrino:22:in
from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/bin/ruby_executable_hooks:15:ineval' from /Users/gavinw/.rvm/gems/ruby-2.3.3@padrino/bin/ruby_executable_hooks:15:in
'
Any ideas how to skip sessions for the API app in this kind of setup? The API does not need them for anything and currently it's creating a new session for every request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.