Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #357 from kytrinyx/local-paths
Standardize sample project paths. Fixes #356
  • Loading branch information
steveklabnik committed Nov 15, 2012
2 parents fec4c45 + c98db36 commit cf052bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/projects/blogger.markdown
Expand Up @@ -30,7 +30,7 @@ First we need to make sure everything is set up and installed. See the [Environm

This tutorial was created with Rails 3.2.2, and may need slight adaptations for other versions of Rails. Let us know if you find something strange!

From the command line, switch to the folder that will store your projects. For instance, I use `Users/jcasimir/projects/`. Within that folder, run the `rails` command:
From the command line, switch to the folder that will store your projects. For instance, I use `/Users/jcasimir/projects/`. Within that folder, run the `rails` command:

```
rails new blogger
Expand Down Expand Up @@ -315,7 +315,7 @@ Now refresh your browser. The error message changed, but you've still got an err
```plain
Template is missing
Missing template articles/index, application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/Users/steve/src/blogger/app/views"
Missing template articles/index, application/index with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/Users/you/projects/blogger/app/views"
```

The error message is pretty helpful here. It tells us that the app is looking for a (view) template in `app/views/articles/` but it can't find one named `index.erb`. Rails has *assumed* that our `index` action in the controller should have a corresponding `index.erb` view template in the views folder. We didn't have to put any code in the controller to tell it what view we wanted, Rails just figures it out.
Expand Down Expand Up @@ -540,7 +540,7 @@ Refresh your browser and you'll see this:
```plain
NoMethodError in Articles#new
Showing /Users/jcasimir/Dropbox/Projects/blogger_codemash/app/views/articles/new.html.erb where line #3 raised:
Showing /Users/you/projects/blogger/app/views/articles/new.html.erb where line #3 raised:
undefined method `model_name' for NilClass:Class
```
Expand Down
6 changes: 3 additions & 3 deletions source/topics/systems/automation.markdown
Expand Up @@ -175,7 +175,7 @@ cd ~/projects/myrailsapp && rake myrailsapp:monthly_report
#### The RIGHT Way

```
cd /Users/username/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production myrailsapp:monthly_report
cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production myrailsapp:monthly_report
```

To find the full path for your rake executable, run `which rake`.
Expand Down Expand Up @@ -217,9 +217,9 @@ You've jumped through the hoops to make your command cron compliant and figured
`crontabe -e`

```
00 00 * * * cd /Users/username/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production myrailsapp:purge_audits
00 00 * * * cd /Users/you/projects/myrailsapp && /usr/local/bin/rake RAILS_ENV=production myrailsapp:purge_audits
```

## References

* Crontab Timing Generator: http://www.openjs.com/scripts/jslibrary/demos/crontab.php
* Crontab Timing Generator: http://www.openjs.com/scripts/jslibrary/demos/crontab.php

0 comments on commit cf052bd

Please sign in to comment.