unicorn

`<module:Templates>': uninitialized constant Tilt::CompileSite (NameError) using Sinatra / Unicorn

泄露秘密 提交于 2019-11-28 04:38:39
问题 I'm new in the Ruby world. I created my first app using Sinatra, and I'm having some trouble on my production server. When I run unicorn -c randmovie_unicorn.rb on my local machine, it works just fine. But in production, I get this error: <module:Templates>': uninitialized constant Tilt::CompileSite (NameError) In my randmovie_unicorn.rb file: preload_app true working_directory "./" listen 8006 worker_processes 2 timeout 30 I'm not using HAML or anything similar. Could somebody help me with

multiple rails apps on nginx and unicorn

房东的猫 提交于 2019-11-28 04:25:53
I successfully setup a rails site using the Screencast 335 deploy to a VPS tutorial. Now I want to add another rails app on a new domain but I am confused about the steps required. In the above setup, there are no changes to sites-available or /etc/nginx/nginx.conf. The only configuration is in unicorn.rb, unicorn_init.sh and nginx.conf in my apps config directory. The nginx.conf file looks like this:- upstream unicorn { server unix:/tmp/unicorn.my_app.sock fail_timeout=0; } server { listen 80 default deferred; # server_name my_app.com.au www.my_app.com.au; root /var/www/my_app/current/public;

Webrick as production server vs. Thin or Unicorn?

丶灬走出姿态 提交于 2019-11-28 03:01:11
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 benefit to using Webrick for development? I've been using Webrick since it comes with rails, and I think

https redirect for rails app behind proxy?

元气小坏坏 提交于 2019-11-27 14:38:15
问题 server declaration in my nginx.conf: listen 1.2.3.4:443 ssl; root /var/www/myapp/current/public; ssl on; ssl_certificate /etc/nginx-cert/server.crt; ssl_certificate_key /etc/nginx-cert/server.key; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (!-f $request_filename) { proxy_pass http://upstreamy; break; } } upstream declaration in nginx.conf: upstream upstreamy { server unix:/var/www//myapp/shared/sockets

Using God to monitor Unicorn - Start exited with non-zero code = 1

点点圈 提交于 2019-11-27 12:55:35
问题 I am working on a God script to monitor my Unicorns. I started with GitHub's examples script and have been modifying it to match my server configuration. Once God is running, commands such as god stop unicorn and god restart unicorn work just fine. However, god start unicorn results in WARN: unicorn start command exited with non-zero code = 1 . The weird part is that if I copy the start script directly from the config file, it starts right up like a brand new mustang. This is my start command

Restart Unicorn issue (capistrano)

自作多情 提交于 2019-11-27 11:00:51
问题 I've got following settings in deploy.rb to restart my server: namespace :deploy do task :restart do run "if [ -f #{unicorn_pid} ] && [ -e /proc/$(cat #{unicorn_pid}) ]; then kill -USR2 \`cat #{unicorn_pid}\`; else cd #{deploy_to}/current && bundle exec unicorn -c #{unicorn_conf} - E #{rails_env} -D; fi" end end but it doesn't work. I mean that command executes (it asks me the password and gives no errors), but all changes in config files are still ignored (i.e. number of worker processes or

Nginx cannot find unix socket file with Unicorn (no such file or directory)

我只是一个虾纸丫 提交于 2019-11-27 09:44:49
问题 I am deploying a Rails 4 app to a Fedora 19 x64 server using Nginx and Unicorn. The problem is that I get an error when visiting the address: "We're sorry, but something went wrong." My Nginx error log ( /var/log/nginx/error.log ) shows: 2014/03/08 03:50:12 [warn] 23934#0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014/03/08 03:50:12 [warn] 23936#0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014/03/08 03:50:14 [crit] 23939#0: *1 connect() to unix:/tmp/unicorn

Multiple Rails 4 app using nginx + unicorn [duplicate]

别等时光非礼了梦想. 提交于 2019-11-27 06:29:52
问题 This question already has an answer here: multiple rails apps on nginx and unicorn 3 answers I'm looking for set up a nginx server with unicorn. I the first app is set but it's on the root "/". what i really want is type localhost/app1 and it would run, while if a just enter to the root, html or php pages are going to be open. Any clue? Here's the current nginx.config: worker_processes 4; user nobody nogroup; # for systems with a "nogroup" pid /tmp/nginx.pid; error_log /tmp/nginx.error.log;

multiple rails apps on nginx and unicorn

廉价感情. 提交于 2019-11-27 05:21:31
问题 I successfully setup a rails site using the Screencast 335 deploy to a VPS tutorial. Now I want to add another rails app on a new domain but I am confused about the steps required. In the above setup, there are no changes to sites-available or /etc/nginx/nginx.conf. The only configuration is in unicorn.rb, unicorn_init.sh and nginx.conf in my apps config directory. The nginx.conf file looks like this:- upstream unicorn { server unix:/tmp/unicorn.my_app.sock fail_timeout=0; } server { listen

Thin vs Unicorn on Heroku

白昼怎懂夜的黑 提交于 2019-11-27 00:52:42
问题 Just wanted to get people's opinions on using Unicorn vs Thin as a rails server. Most of the articles/benchmarks I found online seem very incomplete, so it would nice to have a centralized place to discuss it. Unicron is a multi-processes server, while thin is an event based/non-blocking server. Event-based servers are great... if your code is asynchronous/non-blocking - vanilla rails is blocking. So unless you use non-blocking rails libraries, I really don't see the advantage of using Thin.