Gemfile with mysql

15 views
Skip to first unread message

braini...@gmail.com

unread,
Feb 18, 2019, 2:02:50 PM2/18/19
to Ruby on Rails: Talk
Hey Everyone,

I am updating a gemfile so it uses mysql rather than sqllite or progres. Would someone advise me to what I need to swap out in the gemfile so this happens flawlessly?

Thank you

Walter Lee Davis

unread,
Feb 18, 2019, 3:27:33 PM2/18/19
to rubyonra...@googlegroups.com

> On Feb 18, 2019, at 2:02 PM, braini...@gmail.com wrote:
>
> Hey Everyone,
>
> I am updating a gemfile so it uses mysql rather than sqllite or progres. Would someone advise me to what I need to swap out in the gemfile so this happens flawlessly?

One of the easiest ways to figure this out is to use the Rails generator to make a new "stunt" app with the -d or --database option specified to whichever database gem you would use:

rails new stunt_app -d mysql

And then look at the Gemfile and the config/database.yml files to see the major differences.

rails new stunt_app_2 -d sqlite3

Do the same thing with the database gem you are currently using so you can diff the directories, just give it a slightly different app name. You can delete the apps when you're done. You can get a list of available options by issuing the command rails new --help and scrolling down to -d.

Walter

>
> Thank you
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/df136466-6070-4177-b180-9d69e854b484%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

braini...@gmail.com

unread,
Feb 18, 2019, 3:58:46 PM2/18/19
to Ruby on Rails: Talk
Thank you Walter. I appreciate your help. :)
Reply all
Reply to author
Forward
0 new messages