Forum: Ruby on Rails importing mysql table

Ad4fa6771d929811050ff55e822cff1f?d=identicon&s=25 Oliver David (Guest)
on 2013-07-14 20:50
(Received via mailing list)
i got ruby and mysql configured successully on my windows pc.

Im using mysql as default db.  so I created new rails project.

I ran the cmd
rake db:create:all
rake db:migrate

so I got the db created.  I have existing db of country table.  I
imported
it to the development db.

question:
is there some files I need to modify so my ror apps will know about my
country table?

i'm trying to display for instance state is US from the country table.
Im
new to ror and its cool, i love it.  thanks for the help or guidance if
I'm
not doing something right.
5f94b9b346c2aa648a80bc259978e5bc?d=identicon&s=25 Colin Law (Guest)
on 2013-07-14 21:04
(Received via mailing list)
On 14 July 2013 19:49, Oliver David <odavid3@gmail.com> wrote:
>
> question:
> is there some files I need to modify so my ror apps will know about my
> country table?

You need to create a model for your table (which should be called
countries, rails expects table names to be plural).  I suggest working
right through a good tutorial such as railstutorial.org, which is free
to use online.  That will show you the basics of Rails.

Colin
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.