Open kamchatkin opened 3 years ago
Does it work without Unit using rackup
?
rackup config.ru
Yes, the application runs successfully.
$ rackup config.ru
I, [2021-09-06T13:22:12.566046 #110723] INFO -- sentry: ** [Raven] Raven 2.11.0 ready to catch errors
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /home/nk/.rvm/gems/ruby-2.2.3@rails/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:57)
DEPRECATION WARNING: Sprockets method `register_engine` is deprecated.
Please register a mime type using `register_mime_type` then
use `register_compressor` or `register_transformer`.
https://github.com/rails/sprockets/blob/master/guides/extending_sprockets.md#supporting-all-versions-of-sprockets-in-processors
(called from block (2 levels) in <class:Railtie> at /home/nk/.rvm/gems/ruby-2.2.3@rails/gems/sass-rails-5.0.4/lib/sass/rails/railtie.rb:58)
[2021-09-06 13:22:13] INFO WEBrick 1.3.1
[2021-09-06 13:22:13] INFO ruby 2.2.3 (2015-08-18) [x86_64-linux]
[2021-09-06 13:22:13] INFO WEBrick::HTTPServer#start: pid=110723 port=9292
It is now successfully run as follows:
$ bundle exec "unicorn -D -c /opt/rails/current/config/unicorn.rb -E production"
Could you provide a minimal app example, that fails? It seems the characters encodings are somehow involved here. At least looking to the relevant lines of Ruby-on-Rails sources alludes to it.
Any update on this?
I have the same problem. Trying to run it inside Docker Alpine container. This one works as expected, it finds config.ru
rackup config.ru
Unit: config.json
{
"listeners": {
"0.0.0.0:3000": {
"pass": "routes"
}
},
"routes": [
{
"action": {
"share": "/home/app/public$uri",
"fallback": {
"pass": "applications/rails"
}
}
}
],
"applications": {
"rails": {
"type": "ruby",
"working_directory": "/home/app/",
"script": "config.ru"
}
}
}
But configuration using this script throws the error
Hi!
I can't get the project to run on rails under the unit. First all the steps were done under debian 10.10, the project started, but ubuntu project does not start. Can anyone help?
$ lsb_release -a
$ ruby --version
How I set up the unit:
$ unitd --version
$ sudo unitd
Next, I start the application
$ cat current/config.ru
$ cat unit.json
$ curl -X PUT --data-binary @unit.json localhost:8443/config/applications/rails
$ tail -f unit.log
$ rails -v
Any ideas what might be the problem?