passenger

Ruby cgi needs to reload apache for new value?

微笑、不失礼 提交于 2020-01-06 18:03:24
问题 I have phusion-passenger installed with apache on Ubuntu. In my config.ru, I have the following code: require 'cgi' $tpl = CGI.new['myvar'] + '.rb' app = proc do |env| [200, { "Content-Type" => "text/html" }, [$tpl]] end run app So then when I go to my browser at http://localhost/?myvar=hello , I see the word hello printed out, which is fine. Then I change the url to http://localhost/?myvar=world , but the page still shows hello . Only after I reload apache will the page show world . Before

How can I deploy multiple rails app in nginx with one in the root?

不羁岁月 提交于 2020-01-06 14:34:35
问题 I have two rails apps.Now I want them deployed to app1 / app2 /app2/ is that possible? I'm using passenger,nginx and rails 3.2 If that's not possible, how can I redirect "/" to "/app1"? 回答1: upstream rails1 { server 127.0.0.1:8000; server 127.0.0.1:8001; server 127.0.0.1:8002; } upstream rails2 { server 127.0.0.1:7000; server 127.0.0.1:7001; server 127.0.0.1:7002; } server { location / { proxy_pass http://rails1; } location /app2 { proxy_pass http://rails2; } } http://wiki.nginx.org

Phusion Passenger: `no such file to load — bundler`

北城以北 提交于 2020-01-06 08:56:29
问题 So here's the problem. I'm trying to get my Rails 3.2.8 app running on justhost.com's web hosting platform. The app works fine on WEBrick when I ssh into the server and run rails s , but passenger (the server platform provided by justhost) is having some issues. There seem to be a lot of other posts on Stackoverflow where users were having this same problem. I tried as many of the proposed solutions as I could find, but none of them were able to solve my problem. My web hosting service's

rails bluehost error Ruby (Rack) application could not be started

∥☆過路亽.° 提交于 2020-01-06 07:58:06
问题 I've worked through many issues deploying a simple rails app and thought all was good when i saw the rails welcome screen... then I saw lots of errors when I selected the "about your applications environment" link of the default rails page. The errors are below and also appear when I go to specific URLs. I THINK the issue is that my ~/.bashrc file is explicitly calling for export GEM_PATH=$GEM_HOME:/usr/lib64/ruby/gems/1.8 when the errors reference gems/1.9.3 I'm just not sure if this is the

Rails app doesn't run on AWS Elastic Beanstalk, sqlite3 error

最后都变了- 提交于 2020-01-06 04:24:05
问题 I have been trying to get started running Rails on AWS' Elastic Beanstalk, but I have run in to a seemingly insurmountable obstacle: While I am able to spin up a new Elastic Beanstalk running the sample application, I cannot seem to get an EB instance to successfully run my own code. Here are the steps I have taken: Locally running ruby 1.9.3p545 on OSX 10.9.3 Installed aws-eb client tools. Scrupulously followed the following tutorial from Amazon: Deploying a Rails Application to AWS Elastic

Gracefully stop Phusion Passenger running on apache

拈花ヽ惹草 提交于 2020-01-05 04:20:13
问题 I have a docker container with apache running in foreground . On stopping the docker container , a SIGTERM is sent to all the child processes , which is apache in our case. Now, the problem i am facing is to gracefully shutdown apache on receiving SIGTERM signal. Apache normally terminates on the current requests immediately which is the main cause of the problem . Somehow, i need to translate the SIGTERM signal to SIGWINCH , which would eventually gracefully shutdown the server. I was

Multiple rails apps on single IP (nginx + passenger)

半腔热情 提交于 2020-01-05 04:01:11
问题 I'm looking for the way to serve multiple rails apps on one server. I uploaded one of the apps and it works just fine. But as soon as I create nginx configuration for a new app, it crashes first one. I can't find an appropriate guide for this. If you have any advice, please share. 回答1: it can surely help you with reverse proxy as well as serving multiple apps: https://gist.github.com/soheilhy/8b94347ff8336d971ad0 来源: https://stackoverflow.com/questions/44764009/multiple-rails-apps-on-single

Rails 3.1 SASS asset helpers not not including RAILS_RELATIVE_URL_ROOT / relative_url_root

微笑、不失礼 提交于 2020-01-04 03:11:49
问题 I have been working on an upgrade to Rails 3.1 from 2.3.11. One of the main hurdles to clear is the conversion to the asset pipeline. In this process I decided to convert my css to sass (scss). In rails 3.1 all assets delivered through the pipeline receive a hash appended to the filename in production. Because of this, all the images referenced in my css now needed to use the image-path or image-url helpers in sass. The issue is, that even though I have set my ENV['RAILS_RELATIVE_URL_ROOT']

Rails 3.1 SASS asset helpers not not including RAILS_RELATIVE_URL_ROOT / relative_url_root

主宰稳场 提交于 2020-01-04 03:11:22
问题 I have been working on an upgrade to Rails 3.1 from 2.3.11. One of the main hurdles to clear is the conversion to the asset pipeline. In this process I decided to convert my css to sass (scss). In rails 3.1 all assets delivered through the pipeline receive a hash appended to the filename in production. Because of this, all the images referenced in my css now needed to use the image-path or image-url helpers in sass. The issue is, that even though I have set my ENV['RAILS_RELATIVE_URL_ROOT']

CSV not working for Rails 3 in Production using passenger

一世执手 提交于 2020-01-04 01:58:08
问题 I currently have a problem where i am exporting some data and generating a CSV in rails3. In my controller i add the following at the top. require 'CSV' I then have my method that generates the CSV file. In development i am able to generate and download the csv file just fine but in production mode, passenger returns me the following error. No such file to load -- CSV wondering if anyone has had this issue because i thought the CSV library included in ruby 1.9.2, i am not using any gems for