Questions tagged [ruby-grape]

Grape lets you quickly add maven repository dependencies to your classpath OR Grape is a REST-like API micro-framework written in Ruby to sit on top of Rack.

Grape is a framework that allows for quickly defining REST-like interfaces in Ruby. It provides a DSL for defining versioned APIs as a collection of entities mounted on Rack.

385 questions
0
votes
1 answer

grape api ignores PUT/POST params

I am building a grape api for a rails app. I am testing it with rspec request specs. I have encountered the problem when making a post route like this: resources :events do segment '/:event_id' do resources :tickets do post do …
pawurb
  • 516
  • 6
  • 19
0
votes
1 answer

How to skip attributes/key in JSON output?

Images Model contain id, file_name and description. Gem: either RABL or GRAPE The usual output is: { "images": [ { "id": 48660, "file_name": "9e0f6.jpg", "description": "View 1" }, { …
user1464604
0
votes
2 answers

Ruby path makes require impossible

I am a beginner in ruby, and i have a problem using my ruby script, that work on my computer, on a server. My problem is that i don't become to require 'rack/cors' and require 'grape' On my computer it works, without using any trick. But on the…
Manny42
  • 588
  • 2
  • 4
  • 21
0
votes
3 answers

Simple join between two tables in Rails

I am building a rails application to work as a back end for APIs. (using grape APIs) I have two tables (user, comment) where a user has many comments and a comment belongs to one users. I am trying to return all comments, and within the Comment…
alybadawy
  • 489
  • 2
  • 7
  • 13
0
votes
3 answers

Testing Goliath + Grape with Rspec

I'm trying to test a Goliath + Grape app like the following: require 'em-synchrony/em-mongo' require 'yajl/json_gem' require 'goliath' require 'grape' class API < Grape::API version 'v1', :using => :path format :json resource 'categories'…
Luca G. Soave
  • 12,271
  • 12
  • 58
  • 109
0
votes
1 answer

MiniMagick affecting Amazon S3 file that comes before resize code

I'm attempting to upload the full size image that comes from a post, then thumbnail it and put the thumbnail on S3. However, I'm running into a strange issue where the my resize code seems to be affecting the full size image, even though S3 should…
nullfox
  • 597
  • 1
  • 4
  • 16
-1
votes
1 answer

Grape + Cucumber | number of arguments

in my tests with cucumber I have a problem. I'm getting a wrong number of arguments (given 1, expected 0) (ArgumentError) error when I try to make a request. I make a request that is missing parameters, I should get a 400 error with the missing…
-1
votes
1 answer

How I can use param in url without creating table in database

I have a controller that works without a table in the database. At the moment, there is an action index that performs a request to the api from which it performs the action. Route looks like /car_collector. And my question is how to create a route…
-1
votes
1 answer

Problem with create authenticate api using grape in ruby on rails

I want to do authenticate API using grape. For auth I used Devise gem. I try include devise::sessioncontroller into my grape api file but it's caput. class SignIn < BaseAPI resource :sign_in do desc 'Sign in page' params do requires…
-3
votes
1 answer

How to build streaming API with Ruby Grape?

I want to build a API with Grape, which could be POST file through http streaming. How to do that? PS grape example of rack-stream couldn't work error info: HTTP/1.1 503 Service Unavailable
travo
  • 1
  • 1
1 2 3
25
26