puma

puma gem - Failed to build gem native extension

守給你的承諾、 提交于 2019-11-29 20:11:42
I was getting the following error while installing puma gem $ gem install puma Fetching: puma-2.11.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing puma: ERROR: Failed to build gem native extension. ruby extconf.rb checking for BIO_read() in -lcrypto... no checking for BIO_read() in -llibeay32... no *** extconf.rb failed *** Try the following gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include bundle install You can also specify the gem version, like the following: gem install puma -v '2.11.3' -- --with-cppflags=-I/usr/local/opt

cannot load such file — rack/handler/puma

喜欢而已 提交于 2019-11-29 15:11:26
问题 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

How to get Rails 4 ActionController::Live streaming working with Thin and Ruby 2? And how do Thin and Puma scale with live streaming?

为君一笑 提交于 2019-11-29 14:33:58
问题 I get it working with Puma, but with Thin I don't get any stream output and I have to kill the server to stop it. I'm testing using tenderlove's initial example outputing the current time: http://tenderlovemaking.com/2012/07/30/is-it-live.html A more general question to me is, is this type of streaming practical in an app with any significant traffic? I imagine there can be easily hunderts if not thousands of users connected to a stream at once in such app. How would Puma scale here? I read

Installing Puma on Windows error

有些话、适合烂在心里 提交于 2019-11-29 08:52:01
Tried installing Puma on Windows and getting this error - Temporarily enhancing PATH to include DevKit... Building native extensions with: '--with-opt-dir=c:\openssl' This could take a while... ERROR: Error installing puma: ERROR: Failed to build gem native extension. C:/RailsInstaller/Ruby2.1.0/bin/ruby.exe extconf.rb --with-opt-dir=c:\openssl checking for BIO_read() in -lcrypto... no checking for BIO_read() in -llibeay32... no *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details.

How do I use puma's configuration file?

耗尽温柔 提交于 2019-11-28 18:21:58
I was following this guide it documents the puma.rb file that is stored inside the app's config directory. The guide is a bit flakey, but here's what I assume the puma.rb file does. Instead of running crazy commands such as this to get puma running on a specified socket: bundle exec puma -e production -b unix:///var/run/my_app.sock You can just specify the port, pid, session and other parameters in the puma.rb file like this: rails_env = ENV['RAILS_ENV'] || 'production' threads 4,4 bind "/home/starkers/Documents/alpha/tmp/socket" pidfile "/home/starkers/Documents/alpha/tmp/pid" state_path "

What is the difference between Workers and Threads in Puma

孤者浪人 提交于 2019-11-28 17:46:09
What is the difference between a puma worker and a puma thread in context of a heroku dyno? What I know (please correct me if I am wrong): Thin is not concurrent, so a web process can only do one request at a time In unicorn, I know I can have several unicorn workers in one process to add concurrency. But in puma there is threads and workers.. Isn't a worker a thread inside the puma process? Can I use more workers/threads to add web concurrency in Heroku? robert_murray As the other answer states, this Heroku article is pretty good with explanations of certain configuration items. However if

puma gem - Failed to build gem native extension

浪尽此生 提交于 2019-11-28 16:00:23
问题 I was getting the following error while installing puma gem $ gem install puma Fetching: puma-2.11.2.gem (100%) Building native extensions. This could take a while... ERROR: Error installing puma: ERROR: Failed to build gem native extension. ruby extconf.rb checking for BIO_read() in -lcrypto... no checking for BIO_read() in -llibeay32... no *** extconf.rb failed *** 回答1: Try the following gem install puma -- --with-cppflags=-I/usr/local/opt/openssl/include bundle install You can also specify

Address already in use - bind(2) (Errno::EADDRINUSE)

╄→尐↘猪︶ㄣ 提交于 2019-11-28 15:03:37
I am trying to deploy Rails app with the Puma web server. When trying to start Puma server with a config file bundle exec puma -C config/puma.rb I get an error that the address is already in use. Does someone know how to fix this? bundle exec puma -C config/puma.rb [23699] Puma starting in cluster mode... [23699] * Version 2.11.3 (ruby 2.0.0-p353), codename: Intrepid Squirrel [23699] * Min threads: 5, max threads: 5 [23699] * Environment: development [23699] * Process workers: 2 [23699] * Preloading application Jdbc-MySQL is only for use with JRuby [23699] * Listening on tcp://0.0.0.0:3000 /

Why is Puma only binding to tcp6? (via `rails s`)

十年热恋 提交于 2019-11-28 07:21:07
问题 Brand new generated Rails 4.2.0 project. Ran rails s , behaved as expected using WEBrick: vagrant@web1:~$ netstat -nlpt Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN 27158/ruby2.1 tcp6 0 0 ::1:3000 :::* LISTEN 27158/ruby2.1 Added puma to Gemfile, ran bundle, then rails s again; came up with Puma, but only bound tcp6 interface, not tcp: vagrant@web1:~$ netstat -nlpt Proto Recv-Q Send-Q Local Address Foreign Address State PID

How can I serve requests concurrently with Rails 4?

半腔热情 提交于 2019-11-28 04:41:10
I'm trying to serve multiple requests concurrently in Rails 4, something I was able to do very easily with config.threadsafe! and Puma in Rails 3. Say I have this controller class ConcurrentController < ApplicationController def index sleep 10000 end def show end end I used to be able to just start puma with puma -t 2:16 -p 3000 (for min 2 threads) and hit index and then show and still have show render properly. In Rails 4, if I attempt to do the same thing Puma now locks on the index request and show never gets rendered. When I hit Ctrl-C for the server Puma gives me this error: Rack app