sqlite vs postgreql in rails [closed] - ruby-on-rails

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
Quick questions, haven't been able to find concrete answers about this questions. I'm guessing it's because the answer is obvious.
I know that in order to push a rails app to Heroku a postgreql database is required. I have only been working with the rails default database sqlite3.
How different is postgreql? Will I be able to make the same activerecord calls and queries that I do with a sqlite3 database with a postgresql database?

First of all, it is possible to keep a development database in SQLite, while deploying to Heroku and having PG in production. It is not recommended, but totally possible. Check out Michael Hartl's tutorial, he shows just that in action (here).
Switching to PG is pretty painless, though. Here's a good Railscast. It also shows how to migrate the database. There are a couple of gotchas in the queries, which you might encounter: strftime, for example, does not work with PG queries. Here's a solution.
You'll also have to start the PG server manually.
pg_ctl -D /usr/local/var/postgres -l logfile start
Other than that you will have little or no problems, Postrgres is an amazing tool, but a couple of Postgres and SQL tutorials won't hurt.

Related

(temporarily)using and learning ruby on rails without internet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
So I'm about to leave for africa for 2 weeks where i will for the most part not have an internet connection, during which i am going to start learning ruby on rails so that i can implement it in the social network i am going to start building when i get back. Im planning on saving the tutorials from rubyonrails.org to my computer before i go so that i can still use them but it seems like almost all of them are dependent on me being able to download files from the internet(for example won't "$ rails new blog" pull that info from the rails server?), does anyone know of a way i could use ruby (in particularly these tutorials) without the internet (like maybe i just need to pre-install a bunch of gems or something?)
I have basically no experience with rails so sorry if my interpretation of ruby and these tutorials is incorrect.
Theoretically, yes, practically, no. Sure, you can fire up a local web server and write code, but you obviously don't want to write everything yourself, you want to take advantage of ruby's gem package system. This will, obviously require an internet connection.

Is it a good idea to use Rails 4.1 Beta in production? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Is it a good choice to use the beta in production?
My Pro: I currently have to implement a lot of features in 4.1 manually or with a bunch of gems. Using 4.1 would really simplify that.
Are there any cons?
Update
Using 4.1 by itself is great -- but I ended up sticking with 4.0 because there are lots of gems that won't work with 4.1 right now. Unless you aren't using other 3rd party gems, probably wait for a while for production projects.
The question: is a edge version raising up performance/security of your application?
So the words i'v trust so far at this question are from rails blog:
In fact, we're already running beta1 in production for Basecamp, so you know it's been taking a good beating. This helped us catch a couple of performance regressions, and we've verified that everything is still spiffy fast on Basecamp.
The obvious con is that something you implement in production may break when Rails 4.1 goes out of beta. Your choices are to delay these features, or implement them using a bunch of gems and then re-do it all later, or risk damaging credibility with customers who are relying on your service to be stable. Personally, I wouldn't go with that last choice.
(Using any version of Rails for production at all is another issue entirely. Personally I prefer LAMP, but am using Rails now in my current job.)

Is it worth setting up my own infrastructure for my rails app? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm new to rails and I am redoing and revamping my current website with it. I have been looking all over the internet about how to deploy my rails app to my server. It seems that everyone is mentioning AWS and Heroku. The problem is that I am not interested in paying money down the road when my website starts to grow.
So would it be worth it to set up my own infrastructure so I can change and modify it as my site grows or is it north worth the trouble for the prices that I could pay for someone (Heroku most likely) to worry about that for me?
Also is it even possible or feasible for that matter to deploy myself?
Thanks
TopGunCoder
I have a few rails projects hosted on my own virtual server. Ubuntu, rbenv, git, rails, passenger and mysql setup.. There are other setups, for example with unicorn an nginx..it really depends on your projects.
How many hits you'll expect per day/month?
I can recommend hosting little projects by your own. It is cheaper and very convenient. But you need know-how and time.
And the state-of-the art method for deploying rails apps is the capistrano tool.

Hints for a web designer learning RoR? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I'm learning Ruby and Rails and I am installing the RVM in my Mac / OS X Lion.
Any advise?
You have to understand that Gems are just simple libraries that you install when you need them for a particular problem.
Rails for example brings a lot of gems with it by default, and once you need something more you simply add that to your Gemfile.
You just go ahead and install whatever gem you need to solve a problem.
There is this awesome little site called ruby-toolbox that gives you a listing of the most used RubyGems for solving different problems, but you usually only select one once you actually have a problem.
For starting out with Rails you won't need anything besides Rails.

How do you choose which hosting is better for rails [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I have been planning to host a site built on rails on the web. How can choose the correct hosting site? How do I know they have installed the same version of rails which I worked on? Can I ask the hosting site to install the required rails version and the gems. Or would it be only done to dedicated servers. If you guys wanna suggest any hosting sites, I would also welcome that.
I love so much heroku because is easy to use and it offer a scalable environment.
But i use dedicated servers with apache+passenger to run my rails application so i can do what i wan't on my system.
Some hosters offers a console to manage your gems so you can run your application in any version of rails.
If you're Linux savvy, you could also go with a VPS solution such as Linode. A little more work on your end, but you have complete control and will know exactly what versions of what are being used.
This website is good to choose Rails hosting http://www.railshosting.org/
i am working for a startup and they are currently hosting at heroku. Its built for rails and very good in terms of customer support.
the name "engineyard" is being heard these days a lot..you can probably give that a try..

Resources