New answers tagged ruby-on-rails
You should go to app directory: cd ~/app-root/repo/ then you can run rake commands (e.g. rake db:migrate). You can go to Rails console by running: rails console
Fixed by running: sudo env PATH=$PATH bundle exec rails s -e production -p 80
The ELB will not hit your domain name, it'll hit your IP address. Test curl -I https://my.**IP**.goes.here/__status__ to verify your status check works properly - it'll hit the default vhost. edit: Per your updated results, your server is redirecting your HTTP accesses to HTTPS. ELB doesn't consider a 301 a success, so it's treating it as a failure. Exempt ...
Assuming you're using Apache, create separate virtual host definitions for each "app". For example: <VirtualHost app1.arturo.com:80> ServerName app1.arturo.com DocumentRoot /var/www/sites/app1.arturo.com/public </VirtualHost> [...] <VirtualHost app5.arturo.com:80> ServerName app5.arturo.com DocumentRoot ...
Yes, Rails can do it inside controllers, see docs for details: class PostsController < ApplicationController http_basic_authenticate_with name: "dhh", password: "secret", except: :index def index render plain: "Everyone can see me!" end def edit render plain: "I'm only accessible if you know the password" end end
I managed to solve the problem. The problem is that nginx can't read /tmp/unicorn.rails_app.sock since PrivateTmp=true in /etc/systemd//system/multi-user.target.wants/nginx.service These are what I dit. Created directory for unicorn socket mkdir /var/run/unicorn chown rails:rails /var/run/unicorn chmod 755 /var/run/unicorn Modified nginx.conf upstream ...
The general principle at work here is called "service discovery". There are any number of different ways of achieving it. Here are a few: Query the EC2 APIs for the list of machines in the group at any particular time. Have the machines register themselves in DNS (via any number of means) against a common RR name; when you retrieve the records for that ...
Top 50 recent answers are included