1

I created a new proyect[sic] in rails:

$rails new my_app 
$rail server

and it works just fine, but when I try to add more stuff:

$rails generate scaffold post title:string body:string
$rails db:migrate
$rails server

then I receive this error:

AbstractController::Helpers::MissingHelperError in PagesController#dashboard
Missing helper file helpers//users/jamesfend/sites/feedbackz/app/helpers/application_helper.rb_helper.rb

Extracted source (around line #1):
1 class ApplicationController < ActionController::Base    
2 # Prevent CSRF attacks by raising an exception.
3 # For APIs, you may want to use :null_session instead.
4 protect_from_forgery with: :exception

Im in windows 10 working with Git Bash v:2.13, rails v:5.0.1 and ruby v:2.2.6, I tried to change the names to capitals letters; I tried:

cd ~
mv projects projects1
mv projects1 projects

Does anyone know how to fix it?

Scott Weldon
  • 9,673
  • 6
  • 48
  • 67
marcos
  • 42
  • 8
  • I think the file name application_helper.rb_helper.rb is causing the problem. It should have been application_helper.rb – Rada Bogdan May 16 '17 at 04:32
  • Possible duplicate of [Strange error in rails - missing helper](http://stackoverflow.com/questions/27871726/strange-error-in-rails-missing-helper) – Gerry May 16 '17 at 04:34
  • when i look at the original file it actually says aplication_helper.rb but when the error shows up it add the _helper.rb – marcos May 16 '17 at 04:35
  • when i write Post.all in the rails console it says; Post Load (3.4ms) SELECT "posts".* FROM "posts" # is that normal? because it suppose to say the elements inside post right? – marcos May 16 '17 at 04:46
  • It will only contain posts if the db contains posts. – hashrocket May 16 '17 at 05:15
  • Run this in irb: File.expand_path("./") Then run: pwd. What is the output you get from each of these? – hashrocket May 16 '17 at 05:28
  • Please read the description for a tag before applying it to your question. The [tag:git] tag is for questions about Git usage and workflows, not programming questions that happen to involve a Git repo. (I've [edited](//stackoverflow.com/help/editing) your question to remove it.) – Scott Weldon May 16 '17 at 17:08
  • oh sorry Scott Weldon, thank you for changing it – marcos May 17 '17 at 01:57
  • when i write in the irb the File.expand_path("./") i get the route for my ruby version, is that what im looking for or i should change it some how? – marcos May 17 '17 at 02:09

1 Answers1

1

i finally know what happend, it was really simple. i just update all the ruby gems doing gem updateand now it works. there was one gem (rdoc) that i couldnt update but it still worked

marcos
  • 42
  • 8