Comments (9)
Got that error gone by forking padrino-core and replacing mustermann19 with mustermann.
But any of the resource :channel responds Sinja::NotAcceptableError
Also if I use Sinatra::Base instead of Padrino::Application it does the same.
from sinja.
Hi @jnylen:
Got that error gone by forking padrino-core and replacing mustermann19 with mustermann.
It looks like maybe Mustermann was forked to add support for Ruby 1.9, and this is the version Padrino is using, instead of the version of Mustermann that is used by Sinatra 2.0. Your fix may have gotten it to work for now, but there are likely other issues within Padrino if you use a different Mustermann. Does Padrino pass its test suite with your change?
I have an issue trying to load sinja with Padrino.
I cannot recommend using Sinja with Padrino at this time. Although Padrino is based on Sinatra and it should be fine, I have not tested it at all. I'm not familiar enough with what Padrino does to integrate with Sinatra, and how that might interfere with what Sinja does to integrate with Sinatra. Stick with vanilla Sinatra if you can.
But any of the resource :channel responds Sinja::NotAcceptableError
Are you following the {json:api} specification? It sounds like you need to send an Accept header with your requests. 😄
from sinja.
@mwpastore,
Padrino tests passes for everything above 2.2.0.
Send a specific Accept with vnd.api thing didn't help. Could you try a sample padrino app on your side if it fails there too?
from sinja.
I can't commit to supporting Sinja in Padrino at this time.
You sent Accept: application/vnd.api+json
? What client library are you using? Can you try to get it working from the command-line with curl
?
from sinja.
I tried with curl, and I get 404:
curl -H "Accept: application/vnd.api+json" http://localhost:2300/v3/channel
(and with /v3/channels)
from sinja.
Okay? Where is your application mounted? Is this Padrino still or Sinatra::Base? How were you structuring your requests to get the 406 errors in the first place?
from sinja.
The app is mounted like:
Padrino.mount('Server::ApiV3', :app_file => Padrino.root('api_v3/app.rb')).to('/v3')
Ah, I got it working by using Sinatra::Base again.
Is it possible to show the API even though the user doesn't send Accept: application/vnd.api+json (or what its named) when they send Accept: */*? It won't show up in chrome. But will show up in curl.
from sinja.
Got it working.
Fast as hell so far. Good job.
from sinja.
Great! Glad to hear it!
from sinja.
Related Issues (19)
- TODO HOT 1
- Rewrite error handling as middleware
- Add examples and extensions for other DALs and ORMs
- Create Ember demo app
- Document Sequel helpers and extension HOT 1
- Document demo app
- Implement filtering, sorting, and paging
- Allow custom route names HOT 4
- Generate Swagger documentation
- Primary key updating broken on JRuby
- All creates yield `Malformed {json:api} request payload` HOT 9
- Custom routes within resource block not working HOT 4
- NoMethodError - undefined method `nullif' HOT 5
- Question about filters HOT 20
- Really slow require of Sinja
- getting Malformed JSON in the request body when request.body is not rewindable HOT 2
- Implement Ruby 3 support? HOT 2
- I think you can do this, we will support you
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sinja.