Forum: Ruby on Rails importing mysql table

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
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
This topic is locked and can not be replied to.