Mysoulisinseoul
Mysoulisinseoul

Reputation: 1061

Devise not working with rails. (Undefined local variable or method `‘devise’' for Gemfile)

I've added gem 'devise' to the gem file after having done gem install devise.

I get the following error when I run bundle install:

Undefined local variable or method‘devise’' for Gemfile.`

My Gemfile looks like this:

source 'http://rubygems.org'

gem 'mysql'


gem 'rails', '4.0.4'

gem ’devise’

when I remove the gem devise bundle install works, otherwise I get the error undefined local variable or method devise for Gemfile.

Upvotes: 2

Views: 2246

Answers (2)

toShipwreck
toShipwreck

Reputation: 31

If you're using TextEdit on Mac OSX, you may want to make sure that under your preferences Smart quotes is not checked. This will update your apostrophes and quotes into what is "typographically appropriate" according to the program. You're typing a single tick mark / prime mark (U+2027) and its converting it to a an apostrophe (U+2032). Alternately, you can hold the ctrl key while pressing the quote mark to get the non-slanted tick mark. I just spent 20 minutes with this same issue.

Upvotes: 3

Rajarshi Das
Rajarshi Das

Reputation: 12320

Your Gemfile should look like below

Gemfile:

source 'https://rubygems.org'
gem 'rails', '4.0.2'
gem 'devise'

Upvotes: 0

Related Questions