Code For Ror Apps In Git
THL Toolbox > Developers' Zone > Web Development > Code for RoR Apps in GIT
Code for RoR Apps in GIT
Contributor(s): Andres Montano
All the THL Rails projects are in http://github.com/thl (projects include both the applications and the plugins).
Rails with Postgres
- Download the installer from http://code.google.com/p/msysgit/downloads/list
- The current installer version for Windows is Git-1.7.3.1-preview20101002.exe
- Install GIT
- Create an account on GitHub: http://github.com/
To set up localhost to run Place Dictionary:
- Launch Git Bash (should be a shortcut icon on your desktop)
- Log in to GitHub at http://github.com
- Click on Need help with public keys link
- Or, go to http://help.github.com/msysgit-key-setup/
- Follow the instructions for generating a SSH public key
- Follow the instructions for adding a key to your GitHub
- Go back to https://github.com/account
Open id_rsa with a text editor; copy the public key and paste it into the Key box on https://github.com/account
Install the Place Dictionary
- On your hard drive, create a folder outside of subversion folders: thl-rails
- add the folder program files/git/bin: right-click on Control panels > Advanced system settings > system properties > Environment variables > edit system variables; paste in at the end ;C:Program FilesGitbin
- Open GitBash and cd to the thl-rails folder you just created
- Run the command: git clone git@github.com:thl/places.git
- It will say: "cloning into places…"
- Type yes in answer to are you sure you want to conintue connecting (yes/no)?
- cd places (c:/thl-rails/places)
- run the command: git submodule init
- run the command: git submodule update
- exit GitBash
Install Ruby
- Go to http://rubyforge.org/frs/download.php/72085/rubyinstaller-1.8.7-p302.exe
- Run the ruby installer
- Click on Start Command prompt with Ruby from the Ruby folder
- run: gem list (m,akes sure Ruby is installed properly)
Install Rails
- In the Ruby command prompt window, run: gem install rails -v 2.3.4 --no-ri --no-rdoc --platform=mswin32
Install hpricot
- In the Ruby command prompt window, run: gem install hpricot --no-ri --no-rdoc --platform=mswin32
- cd thl-rails/places/config
- Run ls
- In Windows Explorer, go into thl-rails/places/config and copy the file database.example; paste it into the same folder and rename database.yml
- Open database.yml using Notepad
- Delete everything that is above # postgres information
- Uncomment the hashes from development and all its children all the way down; leave # production needs to be defined....
- delete the space before development; text; production
- delete the tab before the children of those and replace with two spaces
- Connect to dev.thlib.org with config from Ron for PGMyadmin
- In database.yml, in development section, change username to postgres
- below password, add port: 5433
- Go to ruby command line
- in thl-rails/places
- type: ruby script/server
- type: gem install ruby-debug
- type: gem install ruby-debug --no-ri --no-rdoc --platform=mswin32
- Download ruby-debug-base gem
from http://rubyforge.org/frs/download.php/46863/ruby-debug-base- 0.10.3-mswin32.gem. Download it to C:some_location
- cd to the location on C: where you downloaded the file
gem install ruby-debug-base -l gem install ruby-debug gem install ruby-debug-ide -v 0.4.6 gem install pg gem install postgres-pr
- cd to thl-rails/places
- Run: ruby script/server
- run: gem install mongrel
- run: ruby script/server
- Open a browser and enter this URL: http://localhost:3000
- Should open Place Dictionary in the browser
- Then you can add to URL for /features/### etc
places/vendor/plugins/places_engine/app/views/features/_feature.html.erb
- in database: thdl_places_environment
#
- /thl/places, there are three links:
git@github.com:thl/places.git Clone the places repository to your hard drive