Comments (25)
Did you restart the application?, also how is the sabisu configuration?
from market_place_api.
How can I solve the problem
I'm using pow,
OS : mac os Capitan
ruby : ruby 2.2.1p85
rails : 4.2.4
pow : 0.5.0
I can confirm the other url as blow:
http://api.marketplaceapi.dev:3000/users/1
I can't only http://api.marketplaceapi.dev:3000/sabisu_rails/explorer in chapter 3.
https://gyazo.com/fb549b2c53c9abbfbec092a954d6c02f
from market_place_api.
Are you using a multithread server?, something like puma or unicorn?
from market_place_api.
umm.. may be, I did't using multithreaded server on local.
I think Just use webrick embedded.
I use ver WEBrick 1.3.1
I checked the process in my local.
I check two ruby process in my local.
is it able to be problem?
ruby 3807 y_kim 12u IPv6 0x70d9ffafb4192263 0t0 TCP localhost:hbci (LISTEN)
ruby 3807 y_kim 13u IPv4 0x70d9ffafbd4a9b03 0t0 TCP localhost:hbci (LISTEN)
from market_place_api.
There are two possible solutions:
You can use puma + foreman + Procfile to run it on a single instance.
Procfile
web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development}
The other option is to run the api with Pow and the same rails app with let's say, rails s
and go to the sabisu url
from market_place_api.
I did it you said. But I can't.
I don't know what's problem.
Are you need gem list I installed?
https://gyazo.com/ec71f3b8d87f7454fc2ab83db8acb24e
from market_place_api.
But are you using Foreman?
from market_place_api.
I use foreman as blow
my gem file like as blow
source 'https://rubygems.org'
gem 'rails', '4.2.4'
gem 'sass-rails', '> 5.0'> 4.1.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '
gem 'jquery-rails'
gem 'active_model_serializers', github: 'rails-api/active_model_serializers'
gem 'devise'
gem 'sabisu_rails', github: 'IcaliaLabs/sabisu-rails'
gem 'compass-rails', github: 'Compass/compass-rails', branch: 'master'
gem 'furatto', github: 'IcaliaLabs/furatto-rails'
gem 'font-awesome-rails'
gem 'simple_form'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development do
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'sqlite3'
end
group :test do
gem 'byebug'
gem 'rspec-rails'
gem 'factory_girl_rails'
gem 'ffaker'
gem 'shoulda-matchers', '>= 3.0.0', require: false
gem 'spring'
gem 'puma'
gem 'foreman'
from market_place_api.
You have to access the foreman server, so:
localhost:5000/sabisu_rails/explore
How does the sabisu initializer look like?
from market_place_api.
Thank you. I success to see the page.
https://gyazo.com/a6b1fc142e2d28408c9b2f6530092b60
Really appreciate to you.
from market_place_api.
Sweet!
I'm closing the issue then
from market_place_api.
I have the same issue, probably I do something wrong here.
I tried prax and stopped on foreman. Here is my setup
Procfile
web: bundle exec puma -t 5:5 -p 3000 -e ${RACK_ENV:-development}
Gemfile:
gem 'sabisu_rails', github: "IcaliaLabs/sabisu-rails"
gem 'compass-rails'
gem 'furatto'
gem 'font-awesome-rails'
gem 'simple_form'
gem 'puma'
gem 'devise' # api gem 'active_model_serializers'
gem 'rails', '4.2.4'
sabisu initializer
SabisuRails.setup do |config|
config.base_api_uri = 'api.marketplaceapi.dev'
config.api_headers = { "Accept" => "application/vnd.marketplace.v1" }
config.resources = [:users]
config.default_resource = :users
The app is started with: foreman start -p 3000
And I still get the error if I go to:
localhost:3000/sabisu_rails/explorer
Before the error is shown I see a popup window where I put user name and password.
Any ideas of what could go wrong here?
from market_place_api.
If you are using prax, you have to include the port on the base_uri
for the sabisu initializer such as:
SabisuRails.setup do |config|
config.base_api_uri = 'api.marketplaceapi.dev:3000'
.
.
.
from market_place_api.
I thought it would work, however in this case I get the timeout error
I tried prax and foreman as well. Nothing seems to be working.
from market_place_api.
It is really weird, if you are using Foreman, try changing the base_uri to the one Foreman provides, and run the rails server on another console session, and try to access...
from market_place_api.
@kurenn,
so here is what I did:
Step 1. Console session 1.
Here is my procfile
web: bundle exec puma -t 5:5 -p 4000 -e ${RACK_ENV:-development}
I tried both ports 4000 and 3000 and on both of them I get the same error
I spent the whole last saturday debugging usage of httparty and found that it uses port 80 whatever I do. When I define the port explicitly "http://api.marketplace.dev:3000" - I get the timeout error in httparty.
I would like to stick to one option, whatever you would recommend, either prax or foreman. I just want it to work :)
from market_place_api.
Are you using prax?
from market_place_api.
I do, the application is linked to prax. On the screenshots above I used foreman.
I hope it is a typical misconfiguration issue when something very small is missing and it is hard to spot it.
You can just put me on the right direction or the one you would started to investigate.
from market_place_api.
If you stop using prax, you have to configure the base_uri
to something like:
config.base_uri = "localhost:4000/api"
And then you can access the explorer through localhost:3000/sabisu_rails/explorer
.
If you choose this option, you will have to change your routes a bit, in order to respond to an api namespace instead of a subdomain:
Before:
namespace :api, defaults: { format: :json }, constraints: { subdomain: 'api' }, path: '/' do
end
After:
namespace :api, defaults: { format: :json }, path: '/api' do
end
from market_place_api.
Ok, finally it started to make sense for me.
The explorer seems to be working but now I have another issue.
Puma caught this error: Attempt to unlock a mutex which is not locked (ThreadError)
Give me some time and I will tell you whether the issue is still valid.
@kurenn, do you have an idea what was wrong with prax?
from market_place_api.
It has to be probably with the port used by it and httparty, I'll check out this last gem to see if I can send a pull request ;)
from market_place_api.
And this is the best thing I have ever seen in my life
Now I am happy to stop thinking about django as the bigger out of the box feature provider .
Thank you very much, @kurenn !
If I can help you somehow with the fix, I am happy to give a try.
from market_place_api.
@tamatsyk Sure, I'll let you know!
I'm really happy you made it to work!
Enjoy!
from market_place_api.
Tried to make it work here and I had to give up :(
Too hard to get it working
from market_place_api.
start prax in the background
from market_place_api.
Related Issues (20)
- Body is blank.? --I can not do DELETE/ POST / PUT / interface Sabisu_Rails HOT 3
- Listing: 6.5: Failure/Error: @user.destroy HOT 1
- Chapter 6 should_not be_published HOT 1
- Unable to access api endpoint (via cURL and in browser) HOT 1
- Found an error in the beginning of Chapter 8.1
- Latest updates of this project HOT 4
- Chapter 10 Pagination issue: Meta object in render json: products, meta: is not rendered in ActiveModelSerializer 0.10.2 HOT 1
- json render format; chapter 7 HOT 1
- Filter chain halted as :authenticate_with_token! rendered or redirected Completed 401 Unauthorized HOT 3
- Rspec test failing in Rails 5 HOT 6
- Rails 5.0.1: Sass::SyntaxError in SabisuRails::Explorer#index HOT 5
- Listing 5.12 HOT 3
- How do I do a log out(destroy the session) using cUrl? HOT 5
- 500 error when user not exist HOT 5
- sign_in in sessions controller does not affect tests HOT 4
- Chapter 6.1.3 Dependency Destroy Factory HOT 3
- I have been getting a 404 for the same request which is successful on another POSTMAN. HOT 1
- Chapter 6.2.6: ActionController::UrlGenerationError: No route matches {:action=>"destroy", :controller=>"api/v1/products" ... HOT 1
- Chapter 6 ActionController::UrlGenerationError:
- Chapter 5 Authentication Rails 5.2
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 market_place_api.