0

I typed code"ruby script/generate model as name:string description:text price:decimal seller_id:integer email:string img_url:string"in"rail_apps".but the cmd shows the error like what the title shows.You can know more refering to the Chap2 of the book"[深入浅出.Ruby.on.Rails].OReilly.Head.First.Rails.Jan.A.learner's.companion.to.Ruby.on.Rails.2009"I am looking forward your help.Thankyou~

1 Answer 1

1

In Rails 3, you need to use rails generate ... instead of ./script/generate ... (or ruby script/generate ...).

Likewise, script/console is now rails console (or rails c for short) and script/server is rails server (or rails s for short).

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks~The rails I use is the instant rails,but it seems that it can identify the codes like "script/generate.."and so on..
I met another problem just now.I typed "cd generate"and then "rake db:migrate"but the CMD shows that "rake aborted could not open database" can ya figure out why..I am really sorry to trouble you coz I am such a rookie..

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.