I Can't Generate The User Model


#1

I have the same issue. I can't generate user model.

$ rails g model User
/home/ccuser/.gem/ruby/2.0.0/gems/railties-4.1.1/lib/rails/app_rails_loader.rb:30:in pwd':
No such file or directory - getcwd (Errno::ENOENT)
from /home/ccuser/.gem/ruby/2.0.0/gems/railties-4.1.1/lib/rails/app_rails_loader.rb:
30:in
exec_app_rails'
from /home/ccuser/.gem/ruby/2.0.0/gems
/railties-4.1.1/lib/rails/cli.rb:5:in <top (required)>'
from /usr/lib/ruby/2.0.0/rubygems/core
_ext/kernel_require.rb:73:in
require'
from /usr/lib/ruby/2.0.0/rubygems/core
ext/kernelrequire.rb:73:in require'
from /home/ccuser/.gem/ruby/2.0.0/gems
/railties-4.1.1/bin/rails:9:in
'
from /home/ccuser/.gem/ruby/2.0.0/bin/rails:23:in load'
from /home/ccuser/.gem/ruby2.0.0/bin/rails:23:in
'


User model - step 2
#2

Hi @edwinnaelbert,

Could you post a link to the exercise you're on?

Also, does restarting the exercise change anything?


#3

Hi, Zystvan!
I'm trying to restart the exercise
https://www.codecademy.com/en/courses/rails-auth/lessons/authentication/exercises/authentication-authentication?action=lesson_resume

it shows me "Fixing your files" message, but nothing happens beside that.
Thank you!


#4

@edwinnaelbert

it shows me "Fixing your files" message, but nothing happens beside that

It doesn't even undo any changes you've made in existing files? That's not good...

Does it work if you try the regular version of the command, like this?

$ rails generate model User

#5

Hi, Zystvan! Today fortune smiles to me and exercise reset succeeded)

$rails generate model User -f
worked. The file has been created.


#6

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.