Boston Python Workshop/Friday handout/OS X 10.6 or 10.5: Difference between revisions

no edit summary
imported>Paulproteus
imported>Paulproteus
No edit summary
Line 69:
* Drag KomodoEdit into your Applications folder.
* Unmount the installer disk image by dragging it from your desktop to the trash.
 
== Verify you can create a new Django app ==
 
* Create a folder on the desktop called <code>django_projects</code>
* Open a new Terminal window and type the following with a return at the end of each line:
cd ~/Desktop/django_projects
django-admin.py startproject test
* Both commands should provide no output.
* Once that's finished, type the following in the Terminal window with a return at the end of each line:
cd test
python manage.py runserver
* The first command should produce no output. The second command will put out a bunch of output, then just sit there until you cancel it (2 steps from now).
* In your browser, go to http://localhost:8000/
* Back in the Terminal window where you ran <code>python manage.py runserver</code>, type control-c to kill the server.
 
 
====If you already have Firefox====
 
Open it, and then go to the Firefox menu (top left of the screen). Select "About Mozilla Firefox."
 
[[File:Firefox-menu.png]]
 
You'll get a window, like the one below, that shows you what version of Firefox you have. Write down that number!
 
[[File:Firefox-version.png]]
 
Now go to [http://www.mozilla.com/en-US/firefox/firefox.html the Firefox homepage] and see what the current version of Firefox is. If it's the same major version (such as 3.6 - you can ignore the third part of the number) then you're good. You don't need to upgrade.
If it's a different major version, then you need to upgrade. Download it from the Firefox homepage and double-click to install. '''If you're at a workshop and you need this file, please ask a volunteer. We may have it on a thumb drive and it'll save you a bunch of download time.'''
 
==== If you don't have Firefox yet ====
 
Go to [http://www.mozilla.com/en-US/firefox/firefox.html the Firefox homepage] and click the big download button. '''If you're at a workshop, please ask a volunteer to see if we have it on a thumb drive. It'll save you a bunch of download time.''' Once you have the file, double click and follow the instructions to install.
 
==== Install the SQLite Manager Firefox Plugin ====
 
Open Firefox, and then go to the Tools menu and select "Add-ons." Click the "Get Add-ons" button at the top. Enter "SQLite" where it says "Search all Add-ons." The first thing that comes up should be SQLite Manager. Click "Add to Firefox" and then follow the instructions to install it.
 
If you have trouble installing, double-check that your Firefox version is at least 3.6.
 
 
== Verify your database is set up ==
* Open a new Terminal window.
* <code>cd ~/Desktop/ruby_on_rails/test_app</code>
* <code>rails generate scaffold user name:string email:string address:text active:boolean</code>
* <code>rake db:migrate</code>
* <code>rails server</code>
* Go to http://localhost:3000/users -> New user -> create a user to make sure we can save to db. (The window where you ran <code>rails server</code> will display debugging information as you do so.)
* In your Terminal window where you ran <code>rails server</code>, type control-c to kill the server.
 
== Verify git is working ==
* Open a new Terminal window.
* <code>cd ~/Desktop/ruby_on_rails/test_app</code>
* <code>git init</code> ([[Output of "git init" command]])
* <code>git add .</code> (Note the dot) (May get line ending warnings; safe to ignore.)
* <code>git commit -m "initial commit"</code> ([[Output of initial check-in]])
* <code>git log</code> (We're just checking to make sure it worked. Verify that it has the right user and commit message.)
Anonymous user