I have just installed Ubuntu Dapper Drake Flight 6 on my desktop machine, and because I had had different problems to install Rails from scratch several times (even the recent session was no exception), I have decided to write a step-by-step guide, which assumes a clean, fresh install of Ubuntu ( i.e. at this point you do not even have Ruby on your machine) and leads you through installing Rails and creating a working test application.
Why is this writeup better than any other how-to-install-rails tutorials out there?
- Because it will tell you to install really just what you need, not 50 packages more
- It will also show you how to configure the DB and other things to really make Rails work, not just installed
Let’s get started!
Note: Some people asked if this manual is for dapper only. I would say mostly yes, because i have had different problems on breezy (for example i had to compile ruby-mysql driver manually). Its not entirely impossible that it will work with breezy – but then you will have to make sure that the packages are the same version as assumed here (e.g. MySQL > 5 etc.)
Part I: Installation
Prepare the system for the installation
- Check /etc/apt/sources.list – make sure you have access to the ‘universe’ packages by uncommenting them:
deb http://us.archive.ubuntu.com/ubuntu dapper universe deb-src http://us.archive.ubuntu.com/ubuntu dapper universe
- Refresh apt packages to make sure you get the most up-to-date stuff:
sudo apt-get update
Install Ruby related packages
- Install Ruby essentials: ruby, irb, rdoc, ri
sudo apt-get install ruby rdoc ri
- Install gems: download, unpack, install
go to http://docs.rubygems.org/ download rubygems-0.8.11.tgz (or the latest version) tar -xzvf rubygems-0.8.11.tgz cd rubygems-0.8.11/ sudo ruby setup.rb
MySQL installation and configuration
- Install MySQL:
sudo apt-get install mysql-server
- Install ruby MySQL bindings
sudo apt-get install libmysql-ruby
sudo gem install rails --include-dependencies
Part II: Configuration
Setup the DB
- Add an user, create a test database and grant acces for the user
mysqladmin -u root create test_development
mysql -u root
Into the db shell, write the following commands:
create user 'batman'@'localhost' identified by 'robin'; grant all on test_development.* to 'batman'@'localhost';
Don’t forget to replace the username/password (unless you happen to be Batman of course – in this case i suggest to use a different password since this can be guessed easily by social engineers 😉
Create and test the rails app
- generate the app files
Lets denote your working directory (the root directory where your future rails project s will reside rails_projects).
cd rails_projects rails test
- edit config/database.yml
cd rails_projects/test vim config/database.yml
- It should look like this:
development: adapter: mysql database: test_development username: batman password: robin host: localhost
- generate a dummy model
ruby script/generate model Dummy
- edit the migration file
class CreateDummies < ActiveRecord::Migration def self.up create_table :dummies do |t| t.column :foo, :string t.column :bar, :string end end def self.down drop_table :dummies end end
- run the migration
- generate a simple maintenance app
ruby script/generate scaffold Dummy Admin
- start the server
Point your browser to http://localhost:3000/admin to see the result.
If you have any problems, please leave a comment, i will try to help you.
that semicolon is supposed to be there after the password. So, you hit on the correct solution. That it isn’t there is probably a misprint.
My main concern is that you can’t guarantee every page of your website will be included in the SERPs. Considering I’m constantly adding new products to my company’s website, I need to be sure that customers can find them as soon as possible.http://www.seoptimizerz.com
Very effective. Thanx.4a7d3d609129a9296bf7ac0608c2097
uke@luke-laptop:~$ set | grep 8080
luke@luke-laptop:~$ unset httpproxy
luke@luke-laptop:~$ set | grep 8080
luke@luke-laptop:~$ sudo gem install rails â€“include-dependencies
Bulk updating Gem source index for: http://gems.rubyforge.org
thanks a lot …
i was faced this prob almost one day.. now got solved with this site..
Acomplia (Rimonabant) is an appetite suppressant diet pill. Acomplia is used complementary to diet and exercise to treat obese or overweight patients who suffer from Type 2 diabetes and abnormal levels of fat in the blood. It can also prevent the risk of cardiovascular disease.Â http://www.genericacomplia.co.uk
Excellent Web Site! Very professional and full of great information. I am greatly enjoying it. Your enthusiasm is wonderful!!!
Penis enlargement, natural penis enlargement, male enhancement, erectile dysfunction, premature ejaculation, erections, male enhancement, penus enlargement and penile enlargement products review for big penis size. http://www.penis4enlargement.com
â€œTry free vigrax plus, viagra, and all other top 2008 male enhancement products for erectile dysfuction, premature ejaculation, for FREE for 20 days.NO SIGNUP required.NO SPAM.NO handling rates.Delievering within a week.Available only for USA, CANADA , UK, GERMNY SWISZERLAND, UAE, AFRICA, JAPAN, CHINA, SOUTH AFRICA and Brazil. There u go. http://www.naturalherbalproduct.com/viagra.html
Matt Spears has been associated with male enhancement and has helped many a men improve their sexual capacities through natural means. Get more on male enhancement and Prosolution Pills at his website http://www.prosolutionpills.com/?a=155642
I am Very thank full the owner of this blog. Becouse of this blog is very imformative for me.. And I ask u some thiing You make more this type blog where we can get more knowledge.
and any one tell me how can I find this type blog. http://www.penisenlargementz.com
Truth is something that we hear a lot about, but when it comes to things like erectile problems and issues with sex, it seems that the waters can sometimes get quite muddied. If you find that you are a man who is having problems performing, it is easy to think that you are the only one who is affected by it, even when this is nothing close to the truth! If you are in a situation where you are trying to move forward and enjoy your sex life again, you’ll find that you need to think about the solutions that VigRX Plus can provide you with, and you also need to know the truth about this new miracle supplement.
Penis enlargement pills have been available for many decades now but due to the nature of the supplement and the reason for wanting them they are not very high profile in the mainstream media. The penis is still considered taboo and what male would freely engage in conversation about the need for them.
ohh…nice post but really?/?
Pingback: Manual Steps Hot Enlarge My Penus | penis enlargement information
Impotence or Erectile Dysfunction happens to most men occasionally and for a variety of reasons. If it is just a few times then it should not be worried upon but if it is frequent or enough to bring you worry and stress then you need to look into just what is causing it.
Thanks for the information you provide, I really liked the topic you created. I hope this information can be useful for those who read it
i’ve been reading your blog for a while. i must say your blog is a good regular read – kudos!
i will tag this blog and lead my guys to read about this. brilliant stuff!
I discovered your blog on Yahoo , this is a good site , i will come back.
This is the best weblog for anybody who wants to know about this subject. You know so significantly its virtually hard to argue with you (not that I genuinely would want…HaHa). You undoubtedly set a new spin on a subject matter thats been composed about for years. Excellent stuff, just fantastic! Forex Software System Trading
Hello guy, was just searching through the internet and looking 4 some infos and came across your page. I am impressed by the information that you have on your blog. It shows how good you understand your subject. I have Bookmarked ya, and i will come back 4 more. You, Rock this Shit!
Hello friend, was just searching through the www looking for some information and go 2 this blog. Iam impressed by the infos that you have on your blog. Shows how good you understand your subject. I have Bookmarked your, and will come back 4 more. Guy, you, Rock this Shit!
Iâ€™d be inclined to give blessing with you here. Which is not something I usually do! I really like reading a post that will make people think. Also, thanks for allowing me to comment!
My brother suggested I may like this website. He used to
be totally right. This post actually made my day. You cann’t
consider simply how much time I had spent for this information!
Admiring the time and energy you put into your blog and in depth information you present.
It’s good to come across a blog every once in a while that isn’t the
same out of date rehashed material. Great read! I’ve bookmarked your
site and I’m including your RSS feeds to my Google account.
hello!,I love your writing very a lot! percentage we keep in touch extra about your
post on AOL? I need an expert on this house to
solve my problem. Maybe that is you! Taking a look ahead to see