Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJen Hamilton
9,994 PointsNeed Tech Help: system setup for Ruby on Rails
Something went terribly wrong when I was on the Profiles Controller portion of Simple Ruby on Rails app tutorial, and now I'm getting endless errors. It has something to do with my specific computer setup, some sort of conflict with Ruby, Rails, Gems, I don't know what else. I tried rolling back via Git to before the problems started, but I simply cannot fix the the problem. Is there anyway I could get help? I'm worried I won't be able to build anything with Ruby at this point. This isn't really the right kind of question for a forum, as it's specific to my setup, but customer support sent me here.
11 Answers
Alan Johnson
7,625 PointsJust checked out your GitHub repo, and you've got two copies of each migration, so that's why you're getting that error about multiple migrations. I'd delete one copy of each of those and try running bundle exec rake db:migrate
again.
Alan Johnson
7,625 PointsWe're here to help, Jen! Can you post an example of the errors you're seeing?
Jen Hamilton
9,994 PointsWhich errors, at what point? I spent a solid 6 hours on this last weekend, and then just decided to roll it back. You want the current round of errors?
Jen Hamilton
9,994 PointsHere's what happens when I start the rails server, and I can't change rwx of the dir, regardless of how I try:
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler/runtime.rb:197: warning: Insecure world writable dir /usr/local/rvm/gems/ruby-1.9.3-p392 in PATH, mode 040777
James Barnett
39,199 PointsTry this:
sudo chmod -R o-w /usr/local/
Jen Hamilton
9,994 Pointsthat fixed that, thanks!
Jen Hamilton
9,994 PointsThis is what happens when I open localhost.
Jen Hamilton
9,994 PointsI had issues with git and ruby both looking to the wrong version, so I spent time making sure that my path was ordered correctly:
*username* ~/sites/treehouse/treebook [master] $ $PATH
-bash: /usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/opt/sm/bin:/opt/sm/pkg/active/bin:/opt/sm/pkg/active/sbin: No such file or directory
Jen Hamilton
9,994 PointsHere's the github link, if it helps: Treebook
Alan Johnson
7,625 PointsIt looks like you haven't migrated yet. Try running rake db:migrate
Jen Hamilton
9,994 PointsAlready tried that, too. Result:
*username* ~/sites/treehouse/treebook [master] $ rake db:migrate
rake aborted!
You have already activated rake 10.1.0, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler/runtime.rb:31:in `block in setup'
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler/runtime.rb:17:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler.rb:116:in `setup'
/usr/local/rvm/gems/ruby-1.9.3-p392@global/gems/bundler-1.2.4/lib/bundler/setup.rb:7:in `<top (required)>'
/Users/jenhamilton/Sites/Treehouse/treebook/config/boot.rb:6:in `<top (required)>'
/Users/jenhamilton/Sites/Treehouse/treebook/config/application.rb:1:in `<top (required)>'
/Users/jenhamilton/Sites/Treehouse/treebook/Rakefile:5:in `<top (required)>'
(See full trace by running task with --trace)
James Barnett
39,199 PointsTry this
bundle update rake
Jen Hamilton
9,994 PointsI get:
db/development.sqlite3 already exists
Alan Johnson
7,625 PointsI'm sorry - I think I goofed up. Try bundle exec rake db:migrate
Jen Hamilton
9,994 PointsResult:
rake aborted! Multiple migrations have the name CreateStatuses
Tasks: TOP => db:migrate (See full trace by running task with --trace)
Jen Hamilton
9,994 PointsFrom what I recall, the problem started when over a pg gem. Went through a few things to try and fix, including installing homebrew to get it to install correctly. It's probably something I did wrong in updating git, ruby or the addition of homebrew.
Jen Hamilton
9,994 PointsThat seems to have done the trick. All of the dummy users that I had registered are now gone, but I think I may have rolled back to a point before they were created. I'll start the tutorial over, and post back if I run into more issues. THANK YOU!
Alan Johnson
7,625 PointsAwesome!
Jen Hamilton
9,994 PointsJen Hamilton
9,994 PointsSo...delete the older ones on my system, then add/commit/push. Then run migrate?
Alan Johnson
7,625 PointsAlan Johnson
7,625 PointsCorrect!