F
F
Firawall0072014-08-27 17:56:30
Raspberry Pi
Firawall007, 2014-08-27 17:56:30

Why does the "502 Bad Gateway" server error occur when writing to the sqlite3 database on raspberry pi - debian - ruby ​​on rails - Nginx +passenger?

Given:
1) Debian kernel version 3.10.25+.
2) Ruby on Rails.
3) Bundle Nginx + Passenger as a server.
4) I used sqlite3, mysql as db.
The problem is as follows:
I) in the "rails s" debug mode, the server works correctly, but when you upload the application to the nginx server, you can't write to the database. when trying to make a record (sending a post request), nginx issues "502 Bad Gateway"
rights to the production.sqlite3 file set -rw-rw-rw-
II) When changing in the production config, use the filled developmen.sqlite3 database, data from the database is read.
III) for the purity of the experiment, I installed the same configuration on an IBM compatible x86 computer, everything worked on it.
I read on the internet that the problem is in the crooked passengera.
How to track this error in the logs?
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
Firawall007, 2014-08-31
@Firawall007

Problem with deploying web-server on raspberry PI.
I decided by myself by moving away from "passenger" and switching to "unicorn"
PS: after all, I managed to deploy the "ruby on rails" + "Nginx" + "unicorn" + "mysql" server on Rapberry PI.
information on installing unicorn scooped from here ---> habrahabr.ru/post/120368

@
@mgyk, 2014-08-27
_

How does nginx error to rails? See rail/passenger logs

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question