Macario
Macario

Reputation: 2244

Getting undefined method content_for()

my mac just broke and I had to migrate to an Ubuntu machine. I am working on an app that is already on production on an Ubuntu machine as well.

I cloned this app into my new machine and all the view helpers seems to go missing, btw I am ussing HAML.

I ran my specs and I am getting tons of :

undefined method url_for for #
undefined method t for #
undefined method content_for for #
undefined method form_for for #

Here are the contents of my Gemfile: http://gist.github.com/563759

I've removed all gems from my new machine and reinstall them using bundler to match my production environment.

I also use rvm, I don't know what additiona info may be relevant

Please help!!!

Upvotes: 4

Views: 1233

Answers (1)

Cimm
Cimm

Reputation: 4775

Not sure but why did you add the :require => nil line in your Gemfile? Doesn't this mean it will NOT load Rails resulting in the missing methods you see above?

Also, are you using the same version of Bundler? Bundler recently got upgraded to 1.0 maybe the previous bundle install was using an older version?

Upvotes: 2

Related Questions