Setting up fedora first
rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY*
sudo yum update
sudo yum install fetchmail wget bzip2 unzip zip nmap openssl lynx fileutils ncftp gcc gcc-c++
Install Ruby
sudo yum install ruby ruby-devel rdoc irb
Install rubygems
Download from http://rubyforge.org/frs/?group_id=126
tar xzvf rubygems*.tgz
cd rubygems*
sudo ruby setup.rb
Install Rails
sudo gem install rails
Install postfix and svn
sudo yum install postfix subversion
Install MySQL
sudo yum install mysql mysql-devel mysql-server
chkconfig –levels 235 mysqld on
sudo /etc/init.d/mysqld start
sudo /sbin/service mysqld start
sudo mysqladmin -u root password ‘new-password’
sudo yum install libmysql-ruby1.8
sudo gem install mysql
Install Nginx
sudo yum install nginx
sudo /etc/init.d/nginx start
Install Thin
sudo gem install eventmachine
sudo gem install thin
sudo thin install
sudo /sbin/chkconfig –level 345 thin on
Install Git
sudo yum install git
After trying out various web control panels, I finally settled on webmin.
I was looking for an open source / free web control panel that would allow users easily set up websites via virtual hosts and ftp accounts
Here are the steps to get it up and running quickly. This has to be done on a fresh new slice and not one that is already hosting other websites.
That’s all! You’ll be able to view your site via https://xxx.xxx.xxx.xxx:10000
If you’re getting a security box popup like I did, here’s the link to the solution
Basically, just edit /lib/authenticated_system.rb, and add ‘(:xml, :json)’
def access_denied
respond_to do |format|
format.html do
store_location
redirect_to new_session_path
end
format.any(:xml, :json) do
request_http_basic_authentication ‘Web Password’
end
end
end
Make sure your <head> tag has this too:
<META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”>
<META HTTP-EQUIV=”Expires” CONTENT=”-1″>
Tags: rails 2.0
From :
http://github.com/mislav/will_paginate/tree/master
Installation
script/plugin install git://github.com/mislav/will_paginate.git Usage @posts = Post.paginate :page => params[:page],rder => 'created_at DESC' In the view, page links can be rendered with a single view helper: <%= will_paginate @posts %>
Technorati Tags: rails 2.0
Tags: Add new tag, Rails, rails 2.0
%a weekday name.
%A weekday name (full).
%b month name.
%B month name (full).
%c date and time (locale)
%d day of month [01,31].
%H hour [00,23].
%I hour [01,12].
%j day of year [001,366].
%m month [01,12].
%M minute [00,59].
%p AM or PM
%S Second [00,61]
%U week of year (Sunday)[00,53].
w weekday [0(Sunday),6].
W week of year (Monday)[00,53].
x date (locale).
%X time (locale).
%y year [00,99].
%Y year [2000].
%Z timezone name.
http://snippets.dzone.com/tag/strftime#post1643
http://blogs.ericmethot.com/modal-overlay/
and lowpro
http://jlaine.net/2007/8/3/from-rails-ajax-helpers-to-low-pro-part-i
http://crazyrails.com/how-to-install-restful-authentication/
More… this one has “forget password”
http://www.aidanf.net/rails_user_authentication_tutorial
Tags: Rails
http://www.justinball.com/2008/07/03/checkbox-list-in-ruby-on-rails-using-habtm/
Tags: Rails