Installation - MikeBlyth/mission_database GitHub Wiki
This is just a guide on how to install this application on a new site. If you're not experienced with Ruby on Rails, someone with experience should be around to help!
(A thought: You might be able to deploy directly from the source (on github) to a server (such as Heroku), but I don’t have any experience doing that and there may still be some customization needed, which will be easier to do on your local machine than on a server.)
I’m using Linux Ubuntu 12.04 for development. You can follow most of the same instructions on Windows, and probably Mac, but Windows is much slower with Rails development than Linux, in my experience (though this was with Rails ver 3.0; 3.2 may be faster).
-
Start with a fresh installation of Ubuntu (other distros may work also).
-
Start at the command line (open a shell prompt)
-
Install Git source manager
-
Install Ruby (I'm using 1.9.2p0, but newer versions will probably work also. See also Three Ways of Installing Ruby.
-
Install Rails (just a matter of
gem install rails
) -
Create the source folder for this application: go to the folder into which you want to create the application folder. Your home folder is fine. The following step will create a new folder “mission_database”.
git clone git://github.com/MikeBlyth/mission_database.git
If you want to use a folder name other than “mission_database,” add that name after the clone command above,
e.g.
git clone git://github.com/MikeBlyth/mission_database.git myfolder
-
Go into the project folder you just created, i.e.
cd mission_database
-
Install all the dependencies used by the application:
bundle install
-
Install the PostgreSQL database (Heroku currently requires using PostgreSQL. If you’re using a different host or if they’ve changed their policy, use MySQL or whatever database you prefer; see the Rails documentation for how to do this).
-
Edit the database definitions found in config/database.yml.example, and save as the new file config/database.yml (see Configuring a Database in the Rails Guides)
-
Initialize the database:
rake db:setup
This creates the database and seeds it with initial data.
-
Run the local server:
rails server
This process stays in the foreground by default, so you can see the log, so you may want to put it into its own instance of the shell (command line window).
-
Open a browser and point it to “http://localhost:3000”. You should get a page that offers to set up an administrator, since your database of members is empty. Enter and save the information.
-
Now you should be logged in (or able to log in) to your local system.