How would I configure multiple websites on the same box? I know they would each be in a different directory by application name but how would I redirect using domain name. I know I would have to use apache virtual hosts but with Nginx I'm not sure.
Would it be better to have one IP address or multiple (looks like $1/IP on Linode).
Thanks Ryan, this is perfect for me. My pages are very complex involving multiple models and they only change once per day. I only have a couple user-specific elements to load via JS. Time to get to work implementing this.
I've wanted to implement this for some time now but had a few questions:
1) Should the URL change? i.e. /?page=2
2) What happens when you click a product then click back, are all the same products still loaded? I have seen this problem with a couple websites that use Endless Page.
Browse Source Code: https://github.com/railscasts/270-authentication-in-rails-3-1
I have a similar scenario and I just create a password for every Customer
downcase on create and when you authenticate
What about setting a password for the user then in step 3, having the user set (change) his/her password?
I've been waiting for this: 1-Click Install Ruby on Rails on Ubuntu 12.10
https://www.digitalocean.com/community/articles/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean
Has anyone checked it out?
I just noticed they have "1-Click Install Ruby on Rails on Ubuntu 12.10"
https://www.digitalocean.com/community/articles/how-to-1-click-install-ruby-on-rails-on-ubuntu-12-10-with-digitalocean
+1
+1
This was also useful for ubuntu 12
http://blog.sudobits.com/2013/01/07/how-to-deploy-rails-application-to-vps/
(using ubuntu 12.10)
vim ~/.bashrc # add rbenv to the top vim: command not foundSo I used
I'm able to rehash now
I'm not sure why but it started working after I ran
after gem install brakeman and adding it to my gemfile, I keep getting
and rbenv rehash gives me
Here's what I got
So I had to keep these lines outside the server block to make it work:
All of my apps had:
listen 80;except for my main app, it had:
listen 80 default deferred;So the only difference is I don't have a default app (IP address gets 404 Not Found)
Thanks for your post, that DRYs it up a bit.
You can't use "upstream unicorn", you have to customize for each app "upstream unicorn_app1". I got stuck there too.
Give this a try
Got it. I had to customize nginx.conf
upstream unicorn_app1 { server unix:/tmp/unicorn.app1.sock fail_timeout=0; } server { listen 80; server_name app1.com; root /home/deployer/apps/app1/current/public; location ^~ /assets/ { gzip_static on; expires max; add_header Cache-Control public; } try_files $uri/index.html $uri @unicorn; location @unicorn { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; proxy_pass http://unicorn_app1; } error_page 500 502 503 504 /500.html; client_max_body_size 4G; keepalive_timeout 10; }I used this with my "main" app
listen 80 default deferred;Do you see any ways to improve this?
How would I configure multiple websites on the same box? I know they would each be in a different directory by application name but how would I redirect using domain name. I know I would have to use apache virtual hosts but with Nginx I'm not sure.
Would it be better to have one IP address or multiple (looks like $1/IP on Linode).
Are you looking for this?
http://railscasts.com/episodes/258-token-fields
Perfect, thanks!
Any suggestions to avoid class="span3"? It seems like it would be a maintenance headache.
Docs:
"Use the same .span* classes from the grid system for input sizes."
Thanks Ryan, this is perfect for me. My pages are very complex involving multiple models and they only change once per day. I only have a couple user-specific elements to load via JS. Time to get to work implementing this.
I've wanted to implement this for some time now but had a few questions:
1) Should the URL change? i.e. /?page=2
2) What happens when you click a product then click back, are all the same products still loaded? I have seen this problem with a couple websites that use Endless Page.
Thanks
Rather than using acts_as_list could we just give the position a default value? (i.e. 10000)
Ryan Bates is a God!!
sudo gem install aanand-deadweight
didn't work for me but this did
sudo gem install deadweight
https://github.com/aanand/deadweight/issues/8