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 trial

Ruby

Need 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

Just 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.

So...delete the older ones on my system, then add/commit/push. Then run migrate?

Correct!

We're here to help, Jen! Can you post an example of the errors you're seeing?

Which 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?

Here'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

Try this:

sudo chmod -R o-w /usr/local/

that fixed that, thanks!

This is what happens when I open localhost.

I 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

Here's the github link, if it helps: Treebook

It looks like you haven't migrated yet. Try running rake db:migrate

Already 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)

Try this

bundle update rake

I get:

db/development.sqlite3 already exists

I'm sorry - I think I goofed up. Try bundle exec rake db:migrate

Result:

rake aborted! Multiple migrations have the name CreateStatuses

Tasks: TOP => db:migrate (See full trace by running task with --trace)

From 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.

That 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!

Awesome!