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

Build a Todo list application with Rails 4

Hi everyone! I'm on the step "Generate a Scaffold". Everything was going fine. I added a line of code: "bin/rake db:migrate". Then I added a line after, witch was: "bin/rake db:migrate ". But then I recieved this message:

There was an error parsing Gemfile: syntax error, unexpected keyword_end, expecting end-of-input. Bundler cannot continue.

# from /home/Boben/projects_ruby/odot/Gemfile:18 # ------------------------------------------- # gem 'spring'

end #
# -------------------------------------------

I really don't know what I've done wrong. I've checked the gem file and nothing seems wrong!! But I am a newbie, so I might not know. Here is the line of code: "gem 'spring' end". Please help me! Thank you.

7 Answers

Don't worry about that. You'll come across 'deprecation' issues a lot. Ignore them. A deprecation is something that is no longer supported in that a later release has replaced its functionality with something else - another method, function, or whatever. But the original function still works just as it used to. (This one is also a Rails/Rake issue - so just let it slide - details)

There is a way to mute the warnings but the easiest way is just to ignore them. Your code is fine. Don't worry. :+1:

Steve.

Hi Martin,

I'll assume that entering 'inside my Ruby project file' means in the terminal, not in a code file. That's where it should be.

I have added a comment in your Gemfile post; delete that line - you have an extra end that isn't needed.

Steve.

Hi Martin,

Where did you type bin/rake db:migrate? That should be in the console/terminal, not a line of code in any of your files.

Also, can you paste the contents of your Gemfile into here? THere seems to be an issue with that too.

Thanks,

Steve.

Hey Steve!

I'm using Linux right now, so I typed it into the terminal. bin/rake db:migrate straight inside my Ruby project file. Like Jason Seifer did. I also get the error inside the terminal.

With content, you mean the line of code. Right? Anyways, here is the Gemfile:

 source 'https://rubygems.org'

gem 'rails', '4.2.3'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc

group :development, :test do
  gem 'byebug'
  gem 'web-console', '~> 2.0'
end    # <-- delete this line
  gem 'spring'
end

group :development, :test do
  gem 'rspec-rails', '~> 2.0'
end

group :test do
  gem 'capybara', '~> 2.1.0'
end

Cheers!

SH*T! Dude thanks! The error that I've been recieving is finally gone! Did NOT notice that "end". I really appriciate that you took some of your time to help me, Steve!

But before I let you go (hehe, sorry), something else pops up.

When I type

bin/rake db:migrate

I get:

[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.
[DEPRECATION] `last_comment` is deprecated.  Please use `last_description` instead.

What have I done now..? :-(

I'll see! In the future I will ingnore them. Again, thank you SO much for the help! I really appreciated it Steve. Have a good week.

Cheers from Sweden!

Always happy to help, Martin, so that's not a problem! :+1:

I hope you make good progress on the course; give me a shout if you get stuck with anything.

Love Sweden; great place - we raced in Kalmar a couple of years ago. Loved it. That's where my profile avatar was taken.

Steve.

Yeah, you will definitely hear from me again haha!

Sweden is awesome! Love it hear. Oh, in Kalmar you say? Never been there ): I live in Stockholm!