webrick

Webrick as production server vs. Thin or Unicorn?

会有一股神秘感。 提交于 2019-11-26 23:54:55
问题 It seems like it's taken for granted that you must not use Webrick as production server, but I can't really find anywhere mentioning why. The consensus seems to be: "Webrick is ok for development, but Thin or Unicorn is the choice for production, period." I did look up Thin server's homepage and it talks about requests/second but I don't really understand the graph since there's no annotation. Can anyone let me know why I should use Thin or Unicorn compared to Webrick? Also is there any

How do you configure WEBrick to use SSL in Rails?

穿精又带淫゛_ 提交于 2019-11-26 20:08:22
Prior to Rails 3, you could modify the script/server file to add in SSL parameters and tell the server command to use the HTTPS version of WEBrick. Now that all of those scripts are gone, does anyone know how to get this to work with Rails 3 or 4? JustinParker While the scripts directory in Rails 4 is gone, the bin directory remains. You can get WEBrick working with an SSL certificate by editing the bin/rails script. Tested on Rails 4 and Ruby 2.1.1, installed with rbenv. Much of this is from this blog post and this Stack Overflow question . #!/usr/bin/env ruby require 'rails/commands/server'

What does “WARN Could not determine content-length of response body.” mean and how to I get rid of it?

这一生的挚爱 提交于 2019-11-26 19:18:22
Since upgrading to Rails 3.1 I'm seeing this warning message in my development log: WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true What does this mean and how can I remove it? Is it a problem? Luis Lavena Asked the same question to one of Rails-Core's members: https://twitter.com/luislavena/status/108998968859566080 And the answer: https://twitter.com/tenderlove/status/108999110136303617 ya, it's fine. Need to clean it up, but nothing is being hurt. jasoares The following patch solved the problem in my case; no more

Webrick is very slow to respond. How to speed it up?

我怕爱的太早我们不能终老 提交于 2019-11-26 15:41:31
I have a Rails application that I'm running on my server. When I go to a remote desktop and attempt to load the application, the server takes a good 3-4 minutes to respond with a simple HTML page. However, when I load up the page locally on the server, the page shows up in just a second. I tried pinging the server from my remote desktop and the pings are going through successful in a reasonable amount of time. This all seems to have started after I installed Oracle's basic client and SQLPLUS. Should I suspect Oracle? Has anyone experienced anything similar to this? Having the same issue here

How to set access-control-allow-origin in webrick under rails?

蓝咒 提交于 2019-11-26 15:36:28
问题 I have written a small rails app to serve up content to another site via xmlhttprequests that will be operating from another domain (it will not be possible to get them running on the same server). I understand I will need to set access-control-allow-origin on my rails server to allow the requesting web page to access this material. It seems fairly well documented how to do this with Apache and this is probably the server I will use once I deploy the site. While I am developing though I hope

How do you configure WEBrick to use SSL in Rails?

人走茶凉 提交于 2019-11-26 07:31:24
问题 Prior to Rails 3, you could modify the script/server file to add in SSL parameters and tell the server command to use the HTTPS version of WEBrick. Now that all of those scripts are gone, does anyone know how to get this to work with Rails 3 or 4? 回答1: While the scripts directory in Rails 4 is gone, the bin directory remains. You can get WEBrick working with an SSL certificate by editing the bin/rails script. Tested on Rails 4 and Ruby 2.1.1, installed with rbenv. Much of this is from this

What does “WARN Could not determine content-length of response body.” mean and how to I get rid of it?

拟墨画扇 提交于 2019-11-26 06:54:28
问题 Since upgrading to Rails 3.1 I\'m seeing this warning message in my development log: WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true What does this mean and how can I remove it? Is it a problem? 回答1: Asked the same question to one of Rails-Core's members: https://twitter.com/luislavena/status/108998968859566080 And the answer: https://twitter.com/tenderlove/status/108999110136303617 ya, it's fine. Need to clean it up,

Webrick is very slow to respond. How to speed it up?

对着背影说爱祢 提交于 2019-11-26 04:33:12
问题 I have a Rails application that I\'m running on my server. When I go to a remote desktop and attempt to load the application, the server takes a good 3-4 minutes to respond with a simple HTML page. However, when I load up the page locally on the server, the page shows up in just a second. I tried pinging the server from my remote desktop and the pings are going through successful in a reasonable amount of time. This all seems to have started after I installed Oracle\'s basic client and

Library not loaded: libmysqlclient.16.dylib error when trying to run 'rails server' on OS X 10.6 with mysql2 gem

霸气de小男生 提交于 2019-11-26 03:15:44
问题 I\'ve been struggling with this for some time. I\'ve installed Rails 3, gem, mysql on my Snow Leopard machine. All was going well until I created my first project and tried to run rails server Upon running this I get: jontybrook$ rails server /Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle: dlopen(/Library/Ruby/Gems/1.8/gems/mysql2-0.2.6/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.16.dylib (LoadError) Referenced from: /Library/Ruby/Gems/1.8/gems/mysql2-0