Questions tagged [grape-api]

Grape is a Ruby Gem that provides a DSL to easily develop RESTful APIs.

Grape is a REST-like API micro-framework for Ruby. It’s designed to run on Rack or complement existing web application frameworks such as Rails and Sinatra by providing a simple DSL to easily develop RESTful APIs.

307 questions
0
votes
1 answer

Error while doing rake db:setup in Grape APi sample code

Here is the error on typing rake db:setup git://github.com/leftbee/em-postgresql-adapter.git (at master) is not checked out. Please run `bundle install` So i tried to run bundle install but after that still getting this error. I'm following this…
iJade
  • 23,144
  • 56
  • 154
  • 243
0
votes
1 answer

headers content length is less than actual when using goliath and rack::jsonp

this is the code for the jsonp goliath middleware: https://github.com/postrank-labs/goliath/blob/master/lib/goliath/rack/jsonp.rb all is fine except the headers contain a content-length less than the actual. i'm not sure why where or why its setting…
David
  • 4,235
  • 12
  • 44
  • 52
0
votes
2 answers

Rails 3 with Grape issue

I've been following this post http://martinciu.com/2011/01/mounting-grape-api-inside-rails-application.html I put the module into the lib directory and added the line to routes.rb like shown When I do rails s I get an error, saying uninitialized…
EasierSaidThanDone
  • 1,877
  • 4
  • 20
  • 29
-1
votes
1 answer

should API return 404 status for api/object?filter=param?

Which HTTP status must be returned for api/object?filter=param if record not found? I see following variants: return 404 return 200 and blank response, for example {} I don not find conventions for ruby community. What is best practice?
gayavat
  • 18,910
  • 11
  • 45
  • 55
-1
votes
1 answer

Params :pagination not found! (RuntimeError) grape rails

I have face this issue when I was implementing pagination using grape kaminari gem to show a list.
-1
votes
1 answer

Where do rack application output goes?

I have a rack application running in the following way: $: << File.expand_path("../lib",__FILE__) require '/api' STATIC_DIR = File.expand_path("../public/",__FILE__) run Rack::Cascade.new [::API,…
gal
  • 759
  • 1
  • 12
  • 26
-3
votes
2 answers

complex API vs simple API endpoint

I have a backend Rails application that is mainly API endpoints and a front-end application that is mainly being built in React. Consider the following models: Panel: is an container element inside a dashboard. It defines dimensions/positions…
Francesco Meli
  • 2,484
  • 2
  • 21
  • 52
1 2 3
20
21