passenger

Nginx/Passenger/Rails, where to set RAILS_ENV?

﹥>﹥吖頭↗ 提交于 2019-11-30 04:51:47
I've deployed my site to its testing location, but I'm not sure where I set what the RAILS_ENV should be for this server. Where should I look? Short Answer: passenger_app_env development; Sets: RAILS_ENV RACK_ENV WSGI_ENV NODE_ENV PASSENGER_APP_ENV Example nginx conf: http { passenger_root /home/user/.rvm/gems/ruby-2.1.0@app/gems/passenger-4.0.29; passenger_ruby /home/user/.rvm/wrappers/ruby-2.1.0@app/ruby; passenger_app_env development; } You can use rack_env directive to set the rails env as described here in passenger for nginx documentation 6.16. Rack and Rails >= 3 specific options If you

We're sorry, but something went wrong. - with Rails, Apache, Passenger

与世无争的帅哥 提交于 2019-11-30 04:38:46
I have Rails 3.2.3 with Apache and Passenger . I have a project working in development mode. When I switch the project to production mode ( Passenger standard) it gives me an HTTP Error 500 : We're sorry, but something went wrong. This happens even with WEBrick . Can somebody help me? Edit : My production environment file: http://pastebin.com/ZAudSzkc dennis Make sure you have ran $ bundle install . If this doesn't succeed, go to your production environment and connect to your server using ssh and $ tail -f log/production.log in your current production app. This will generate an output which

Authlogic doesn't work with my Rails 3.2 app

回眸只為那壹抹淺笑 提交于 2019-11-30 04:06:26
问题 I'm running Rails 3.2 and the latest version of Authlogic. When I run my app locally on my Mac, it works fine. When I try to run it on my production server (Ubuntu with Passenger/Apache), I get this: You must establish a database connection before using acts_as_authentic I'm not sure how to troubleshoot the problem. I posted this related question earlier today before I realized that the problem was broader than I thought. 回答1: I figured out the problem. Look at this snippet from Authlogic's

Passenger installation with nginx fails

筅森魡賤 提交于 2019-11-30 03:17:32
I'm running an ubuntu 9.10 server on an amd-64 platform. Everything's pretty much standard, and I've got Sinatra 0.94 running on a ruby 1.8 installation. I want to install passenger in order to easily configure ssl. The problem is, it fails to find the installer. I run sudo gem install passenger or sudo gem install -r passenger and then the next line, passenger-install-nginx-module or passenger-install-apache2-module both fail because the path isn't found. Is there something I'm forgetting here? Shouldn't it just work, straight up, once the gem is installed? Rollo Tomazzi A bit late for an

Password protecting Rails site running on Nginx and Phusion Passenger

北慕城南 提交于 2019-11-30 03:00:11
问题 I want to protect my newly deployed Rails 3 app with the basic http authentication. It's running on the latest Nginx/Passenger and I'm using the following Nginx directive to protect the web root directory: location = / { auth_basic "Restricted"; auth_basic_user_file htpasswd; } htpasswd file was generated using Apache htpasswd utililty. However, after entering correct username and password I'm getting transferred to the 403 Forbidden error page. Analyzing Nginx error log revealed this:

Moving to rbenv breaks passenger (nginx)

情到浓时终转凉″ 提交于 2019-11-30 02:26:43
I moved from RVM to rbenv on my production server. I uninstalled rvm using "rvm implode" and installed rbenv, ruby 1.9.2 , rails, passenger and nginx-module. I have not modified my originlal nginx.conf apart from changing the passenger_root as follows: 1st Try: passenger_root /root/.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems/passenger-3.0.9; passenger_ruby /root/.rbenv/versions/1.9.2-p290/bin/ruby; 2nd Try: passenger_root /root/.rbenv/shims/passenger; passenger_ruby /root/.rbenv/shims/ruby; Now, when I try to run my application I see the following error in error.log: [error] 1291#0:

Is a system-wide install of RVM a bad idea? [closed]

一个人想着一个人 提交于 2019-11-30 01:51:10
I'm confused about whether, on a server, you're supposed to install RVM as a regular user or do a system-wide installation, and, if the latter, how you're supposed to do things like bundle install without using sudo . Is there any definite set of guidelines on what you're supposed to do as far as RVM is concerned on a server running Rails under e.g. Passenger and Nginx? In this type of environment, not all Ruby processes run under the same user, so I think that's where things get unclear as far as RVM and bundler are concerned. How about just avoiding RVM all together on the server and just

Sidekiq worker not getting triggered

旧巷老猫 提交于 2019-11-30 01:31:55
问题 I am using Sidekiq for my background jobs: I have a worker app/workers/data_import_worker.rb class DataImportWorker include Sidekiq::Worker sidekiq_options retry: false def perform(job_id,file_name) begin #Some logic in it ..... end end Called from a file lib/parse_excel.rb def parse_raw_data #job_id and #filename are defined bfr DataImportWorker.perform_async(job_id,filename) end As soon as i trigger it from my action the worker is not getting called.. Redis is running on localhost:6379 Any

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

Phusion Passenger Error: You have activated rack 1.2.1, but your Gemfile requires rack 1.2.2

与世无争的帅哥 提交于 2019-11-29 21:33:29
I'm trying to run a Ruby on Rails app on a Dreamhost shared server. All is well so far except one weird bug I have not been able to unravel. Sometimes when I visit the web app, I get presented with a Phusion Passenger error saying, You have already activated rack 1.2.1, but your Gemfile requires rack 1.2.2. Consider using bundle exec. When I just refresh the page it seems to work, though - no more Phusion Passenger error message. Following other stack overflow threads and a similar Dreamhost wiki , I added the following to the top of the config/environment.rb file: if ENV['RAILS_ENV'] ==