Ruby on Rails - running on a server in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
If running on a remote server that is using Passenger change apache.conf to to the environment you want to use. For example this case you see RailsEnv production.
class Post < ActiveRecord::Base
belongs_to :user
has_many :comments
validates :user, presence: true
validates :title, presence: true, length: { in: 6..40 }
scope :topic, -> (topic) { joins(:topics).where(topic: topic) }
before_save :update_slug
after_create :send_welcome_email
def publish!
update(published_at: Time.now, published: true)
end
<VirtualHost *:80>
ServerName application_name.rails.local
DocumentRoot "/Users/rails/application_name/public"
RailsEnv production ## This is the default
</VirtualHost>