I have previously used apartment on Heroku, but now for a client, I am evaluating if it can be used on AWS. Is there a tutorial that shows how to use the apartment gem on Amazon AWS?
After reading https://aws.amazon.com/running_databases/ , I am not sure how to setup my database.
Should I install postgres on my instance or should I use RDS? Does the RDS allow creating multiple schemas if I use Postgres.
Thanks.
Apartment isn't tied to any hosting provider. It just uses Postgres (by default) for its db. Heroku vs AWS/RDS won't matter.
Sure, you can use RDS. Best to just try it out-- setup a new RDS instance with the aws console then plug the connection string into your rails database.yml config and then run your migrations (rake db:migrate) or load your schema (rake db:schema:load).
Related
I am trying to use the mongodb with ruby on rails
whenever i try to create the new project with
rails new exRuby
preference will be set to sqlite3 in /exRuby/config/database.yml file And automatically "gem 'sqlite3' added to Gem file
But I am trying to use the mongodb with my project. and mongodb is already installed in my system
How to change the database storage to mongodb from sqlite3
Like 'mu is too short' stated, you need to decide which MongoDB interface / gem you want to use to connect to MongoDB. Here is a guide on how to setup a ruby app using Mongoid.
You can run the command rails g mongoid:config to generate the mongoid.yml file. But this is if you choose to use Mongoid. Look at the other gems available and see which one you prefer. Here is a list of available options (according to the MongoDB docs).
I want to implement capistrano in my ruby on rails project. I am using MongoDB as database .
I install capistrano gem.
capify .
[add] writing './Capfile'
[add] writing './config/deploy.rb'
[done] capified!
It gives me file deploy.rb inside the Config. What should i do inside. so where do i have to put mongoid.yml ? Working code is helpful for me to do or some hints is appreciable.
You should first be clear about why you want to implement capistrano :-)
Capistrano is a tool for making deployments easier - it allows for executing commands in multiple remote machines, via ssh.
For a default installation of a Rails App with mongodb, you don't need to have anything related to mongodb in the capistrano deploy.rb file.
You would add some mongodb stuff in this file if there is some mongodb related task that you want to accomplish every time the code is deployed to the remote servers.
Example: Here is a capistrano recipe example to synchronize local mongodb with production
I would recommend that you familiarize yourself with the basics of capistrano by watching the railscast episode on capistrano tasks.
Put mongoid.yml in /config, and type cap deploy in /.
I'm working on a simple Rails (activeRecord based) application, and i'm testing in locally.
Now it's time to move online, but... do i need to insert all the records again in the app's db? I hope not!
Do you know a if is it possible to make a copy of my entire local db and import it in heroku?
Thanks!
erm, using the Heroku CLI
heroku db:push
job done, built into Heroku - will magically transpose your local DB whether it be sqlite, mysql, postgres to Heroku's shared postgresql db.
Try yaml_db gem
https://github.com/ludicast/yaml_db
How do I launch a Rails 3 app on Heroku.
I am using PHPmyadmin.
I would start here
yep, you need to read the manual. Heroku is entirely managed system, you can only deploy via a git push. By default it uses Postgresql as it's DB - you can use mySQL but you'd have to pay for an Amazon mySQL server
Perhaps you should read through the Ruby on Rails tutorial. It guides you through the process of developing an app in RoR and pushing it to Heroku. Good luck.
This part, especially, has information on deployment to heroku:
Heroku Deployment
I'm really new at Ruby on Rails development. I'm reading Head First Rails and it says that Rails uses SQLite3 as its database system.
How exactly would I go about uploading my website/application so the world can use it?
Rails uses sqlite3 by default, though you can edit your database.yml file to use a different adaptor (mysql, postgres, etc.) if you'd like. It's not recommended to deploy to production using sqlite3 as your database due to performance issues, though small apps would be ok.