LuisRuby
2013-Mar-14 00:46 UTC
Ubuntu 12.10 Nginx Rails 3.2.13. Deploy in sub URI. Nothing happens!
Dear friends, I followed the guide on http://techoctave.com/c7/posts/16-how-to-host-a-rails-app-with-phusion-passenger-for-nginx and successfully deployed two apps on the same web server, some months ago. Then when I upgraded to Rails 2.3.13.rc1 everything seems to be OK, but when I visit my app with the browser all that I get is the Welcome page from Nginx. Here is my nginx.conf: worker_processes 4; http { passenger_root /home/luis/.rvm/gems/ruby-1.9.3-p392/gems/passenger-3.0.19; passenger_ruby /home/luis/.rvm/wrappers/ruby-1.9.3-p392/ruby; server { listen 80; server_name domain.com; root /home/lacy/public_html; passenger_enabled on; passenger_base_uri /myapp1; location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } } Here is my deploy.rb: require "bundler/capistrano" require "rvm/capistrano" set :rvm_ruby_string, :local set :domain, ''www.myapp1.domain.com'' set :application, "myapp1" set :repository, "git-9UaJU3cA/F/QT0dZR+AlfA@public.gmane.org:xxxxxxxx/myapp1.git" set :branch, "master" set :scm, "git" set :user, "myapp1" set :deploy_to, "/home/myapp1/apps/#{application}" set :deploy_via, :remote_cache set :copy_strategy, :export set :use_sudo, false set :keep_releases, 3 role :web, ''my IP'' role :app, ''my IP'' role :db, ''my IP'', :primary => true set :port, 22 after ''deploy:update_code'' do run "cd #{release_path}; RAILS_ENV=production rake assets:precompile" end # If you are using Passenger mod_rails uncomment this: namespace :deploy do task :start do ; end task :stop do ; end task :restart, :roles => :app, :except => { :no_release => true } do run "#{try_sudo} touch #{File.join(current_path,''tmp'',''restart.txt'')}" end end Curiously /opt/nginx/logs/error.log doesn''t report anything. I am fighting with this problem during many days without any solution. I''m very tired and under hard pressure from my client, Does anybody have a hint, where to look for my mistake? Thanks in advance! Luis -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/sVlyNQwfrLUJ. For more options, visit https://groups.google.com/groups/opt_out.
Nikolay
2013-Mar-16 11:36 UTC
Re: Ubuntu 12.10 Nginx Rails 3.2.13. Deploy in sub URI. Nothing happens!
Try to create database on server $> rake db:create RAILS_ENV=production replace this: root /home/lacy/public_html; on this root /home/lacy/your-app-name/current/public; Remove this: location / { root html; index index.html index.htm; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } Dont use ''www'' set :domain, ''www.myapp1.domain.com'' Be sure you''ve added ''domain.com'' and ''myapp1.domain.com'' in your /etc/hosts file Make the same set :deploy_to, " /home/lacy/your-app-name" and in your nginx config file root /home/lacy/your-app-name/current/public; After changing your nginx.cong file restart nginx $> sudo service nginx stop $> sudo service nginx start (or $> sudo service nginx reload && sudo service nginx restart) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/1ctOar7iXYYJ. For more options, visit https://groups.google.com/groups/opt_out.