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 trialchris salvi
7,584 Pointsrails s not taking me to server :(
I closed my terminal, and then opened it again and typed in rails s to get the server running, but I can no longer get it to work. Help? I am doing the Treebook deepdive in Rails for reference, but I cant see any of my work :(
Maciej Czuchnowski
36,441 PointsAre you inside the project folder when you type this?
chris salvi
7,584 Pointsyeah I realized I wasnt in the project folder :( still getting used to terminal. Ok help me here however. I've been following the videos to a T, and somehow Im getting an error when I try to see my 'results' so far in my rails app.
See reference: http://postimg.org/image/f6rpczlir/
3 Answers
faranaway
Courses Plus Student 13,885 PointsHi Salvi,
The reason you were seeing that specific message is that your local repository has a commit that hasn't been pushed yet.
Usually after you've a few changes to your treebook files, it's a good idea to use a git status to see what has changed and to see if there are any untracked files.
faranaway
Courses Plus Student 13,885 PointsHi!
With your current screenshot it's hard to see if you're currently in the folder directory of your rails app, but it seems like you're not. Since you closed the terminal you most likely have to change directories once again to your specific project folder.
chris salvi
7,584 PointsHow would I interpret this farandaway? I am in the terminal and in the correct path now, but I cant seem to get my git add working ARGH
Below is what the terminal throws me
On branch master Your branch is ahead of 'origin/master' by 1 commit. (use "git push" to publish your local commits)
Maciej Czuchnowski
36,441 PointsOK, try this:
Exit the server (ctrl + C
) and open your Gemfile in the editor. You should see that line:
# gem 'therubyracer'
Remove the # symbol in front, save the file, run bundle install
and then try rails s
again.
chris salvi
7,584 Pointsthanks maciej, but I can get into the server now. I am now having issues with uploading my commit to github :(
chris salvi
7,584 Pointsjust to confirm, I typed pwd in the terminal and this is my path, which should be correct
/Users/salvi/treebook
that matches up where the file/directory is also when I search for it. Now Im having a devilish time getting the thing to commit to github and I dont exactly want to go in manually and add changes :(
Maciej Czuchnowski
36,441 PointsIf you're absolutely sure that what you have on the computer is what you want, you can force it to be pushed to github, even if github version is ahead by one or more commits: git push --force
.
chris salvi
7,584 Pointsgit push -u origin master
seemed to work for me, although I'd be all ears if you want to share why this would make the changes but a general git push wouldnt
Maciej Czuchnowski
36,441 PointsNo idea at the moment :)
chris salvi
7,584 Pointschris salvi
7,584 Pointshttp://postimg.org/image/qlew9bnaf/
Reference image above of what I see when I type in the Rails S command...