-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails g not working #51
Comments
|
Hmm, doesn't seem to work. When I run Line 2 of script/generate says |
Update (different errors): I found this guide with more info on the script/generate command and added the . before it to make it |
See this commit. Not all of the generators are working yet. (In particular, |
This should complete the fix. Let me know if there are further problems. |
Thank you! The problem I'm encountering now is outside the scope of script/generate, but if you have any advice I'd love to hear it. There's still an error when I run script/generate, but it's because I added an initializer to the app (I'm trying to install Google Omni Auth). The error message in the console is telling me: The relevant line in omniauth.rb: To be clear, this^ came after I received a different error, with pry-rails when trying to generate the model: `/Users/tamenze/.rvm/gems/ruby-2.3.0/gems/bundler-1.14.6/lib/bundler/runtime.rb:94:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'pry-rails'. (Bundler::GemRequireError) Gem Load Error is: uninitialized constant Rails::Railtie` |
Still working on this problem, commented out the OmniAuth block in omniauth.rb to see what would happen. The User model generates, but without any fieldnames when I pass them in. ie: class CreateUsers < ActiveRecord::Migration
def self.up
create_table :users do |t|
t.timestamps
end
end
def self.down
drop_table :users
end
end When I added column names and types manually in the migration file, and then migrated, table was not added to the Schema. So there's a few problems in this path of working, I'll continue digging into them this week, but just an update in case anyone else has dealt with this or has some insight that could point me in the right direction. |
@distler is this built on Rails 2? Can I run it on Rails 4? |
The app is built on Rails 2. Converting to Rails 4 (or 5) would be a big task. |
I'm not sure if this is a legitimate issue or more of a local one, but I'm trying to add a new model and new controller to the app, and having no luck.
Rails generate
doesn't work at all, for neither models nor controllers. Does anyone have insight as to why? I've been digging for a while now and haven't found any clues. Currently looking into how to manually create migration files for entire models as a workaround, but wanted to ask here in the meantime.The text was updated successfully, but these errors were encountered: