puma

How to configure Rails with Puma to use SSL?

江枫思渺然 提交于 2019-11-30 13:56:19
问题 I only found how to start puma using SSL: $ puma -b 'ssl://127.0.0.1:9292?key=path_to_key&cert=path_to_cert' However, there is no description about how to include an intermediate CA cert in the documentation. Could someone point me in the right direction? I am using Puma 1.6.3 Thanks! 回答1: Combining certificate and bundle will work only if you use nginx. Without nginx, you can use ca and verify_mode options: rails s puma -b 'ssl://0.0.0.0:9292?key=path_to_key.key&cert=path_to_cert.crt&verify

ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)

空扰寡人 提交于 2019-11-30 13:39:36
问题 I have a rails app in production that i deployed some changes to the other day. All of a sudden now I get the error ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds) multiple times a day and have to restart puma to fix the issue. I'm completely stumped as to what is causing this. I didn't change anything on my server and the changes I made were pretty simple (add to a view and add to a controller method). I'm not seeing

Using Rails and Puma with subdomains lvh.me?

徘徊边缘 提交于 2019-11-30 13:00:19
问题 I'm using Rails 4 with subdomains, and now switched from Unicorn to Puma. Seems to work fine, but when I try to start "rails s" I get: Rails 4.2.0 application starting in development on http://localhost:3000 I need to run the following rails s -p 3000 -b lvh.me to get: Rails 4.2.0 application starting in development on http://lvh.me:3000 Is there a way to make 'rails s' always to start lvh.me automatically? Used to work like that for me before switching to Puma. 回答1: Rails provide only one

Rails server doesn't see code changes and reload files

陌路散爱 提交于 2019-11-30 12:01:38
问题 I noticed that my rails server doesn't reload controllers, models and probably any other files after I change them. I use Vagrant and Rails API, and I found that some people fix this problem by adding below line to the Vagrantfile . config.vm.provider "virtualbox" do |vb| vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 5000 ] end It doesn't fix the problem for me. I run out of the ideas what else I can do to solve this problem. I attach

Puma Cluster configuration on Heroku

孤者浪人 提交于 2019-11-30 10:22:42
问题 I need some help with my configuration of Puma (Multi-Thread+Multi-Core Server) on my RoR4 Heroku app. The Heroku docs on that are not quite up-to-date. I followed this one: Concurrency and Database Connections for the configuration, which does not mention the configuration for a Cluster, so I had to use both types together (threaded and multicore). My current configuration: ./Procfile web: bundle exec puma -p $PORT -C config/puma.rb ./config/puma.rb environment production threads 0,16

cannot load such file — rack/handler/puma

偶尔善良 提交于 2019-11-30 09:47:01
My setup and the error I get an error when I start my Sinatra application with rackup and puma. My config.ru file looks like this: #\ -s puma require './controller/main.rb' run Sinatra::Application So when I now use rackup I get this error: /home/username/.rvm/gems/ruby-1.9.3-p392/gems/rack-1.5.2/lib/rack/handler.rb:76:in `require': cannot load such file -- rack/handler/puma (LoadError) I use ruby 1.9.3p392 (2013-02-22 revision 39386) [i686-linux] What I have tried so far My first thought was that I forgot to install puma, or puma is broken in some way. So I tried: puma -v puma version 2.0.1

ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds)

不打扰是莪最后的温柔 提交于 2019-11-30 08:02:00
I have a rails app in production that i deployed some changes to the other day. All of a sudden now I get the error ActiveRecord::ConnectionTimeoutError: could not obtain a database connection within 5.000 seconds (waited 5.000 seconds) multiple times a day and have to restart puma to fix the issue. I'm completely stumped as to what is causing this. I didn't change anything on my server and the changes I made were pretty simple (add to a view and add to a controller method). I'm not seeing much of anything in the log files. I'm using rails 4.1.4 and ruby 2.0.0p481 Any ideas as to why my

Puma installation error on windows

不打扰是莪最后的温柔 提交于 2019-11-30 05:38:53
问题 I am trying to install puma gem on Windows machine. I am getting the following error. Went through a couple of forums but in vain. C:/railsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb creating Makefile make generating puma_http11-i386-mingw32.def compiling http11_parser.c ext/http11/http11_parser.rl: In function 'puma_parser_execute': ext/http11/http11_parser.rl:111:3: warning: comparison between signed and unsigned integer expressions compiling io_buffer.c io_buffer.c: In function 'buf_to_str

why did gitlab 6 switch back to unicorn?

[亡魂溺海] 提交于 2019-11-30 01:13:12
Gitlab 6.0 was released yesterday. I am curious to know why they switched to Unicorn from Puma . Versions prior to 5 were using Unicorn . I thought switch to Puma was for the better. Is there a technical reason for this switch? GitLab B.V. CEO here, I agree with Hongli his comment that "If there are issues then they are likely in Gitlab's code.". We tried to fix them but GitLab is one of the largest open source Rails applications and the issues where hard to reproduce. So in the end we opted for the most pragmatic solution, switching back to Unicorn. We love Puma, Unicorn and Passenger and

Puma Cluster configuration on Heroku

巧了我就是萌 提交于 2019-11-29 20:30:33
I need some help with my configuration of Puma (Multi-Thread+Multi-Core Server) on my RoR4 Heroku app. The Heroku docs on that are not quite up-to-date. I followed this one: Concurrency and Database Connections for the configuration, which does not mention the configuration for a Cluster, so I had to use both types together (threaded and multicore). My current configuration: ./Procfile web: bundle exec puma -p $PORT -C config/puma.rb ./config/puma.rb environment production threads 0,16 workers 4 preload_app! on_worker_boot do ActiveRecord::Base.connection_pool.disconnect! ActiveSupport.on_load