> On Feb 20, 2016, at 9:33 AM, krfg <fangor...@yahoo.it> wrote: > > Having finished the Michael Hartl Rails tutorial, which uses Cloud9 as > development environment, I would like to redo it configuring my machine > (Ubuntu 14.04 LTS) as a local development environment. > > I am determined to use Atom + Terminal, and I would really appreciate some > help in determining what remains of all the necessary software to be > installed in my computer, because the tutorial is not much helpful in this > respect. > > Before Rails I decided to study some Ruby. > In the official Ruby web page, Bitnami RubyStack is recommended as a complete > development environment for Rails. Since I planned to study Ruby for Rails, I > installed Bitnami RubyStack: would you recommend to keep it? Or, as I > suspect, it would be better to install each component separately?
Not familiar with that, use it if it works, otherwise, you actually have most of what you need in a vanilla RVM install. > > The official Rails web page used to provide a link for those interested in > how to install the Ruby on Rails development environment: would that be a > recommendable solution? > > Combining my brief experience as a student and The RailsApps Project > suggestions, I suppose I need the following applications: > • A database: the Rails Tutorial uses SQLite but Heroku recommends to > use PostgreSQL also in development (Heroku uses PostgreSQL). I am undecided > because on the one hand I completed the course without noticing any > incompatibility between SQLite and PostgreSQL, and Michael Hartl says that > SQLite is much easier than PostgreSQL. On the other hand I do not know the > limits of compatibility between the two databases, so I would not like to > find myself into trouble. Yes, particularly if you want to use Heroku, but just in general, PostgreSQL is a marvelous database and will give you a lot of features that are not in MySQL (although those lines keep blurring). As free databases go, it's excellent. Heck, as databases go, it's excellent. > • RVM: will I need RVM for switching between Ruby versions? The > RailsApps project recommends it. For the tutorial, it was more determinant > the possibility to choose the Rails version than that of Ruby. Installing RVM in the default manner will make sure that you have a complete development environment, ready to work in Ruby and Rails, right off the bat. If you are missing a library or build tool, it will fail, and in the failure message, give you the apt-get install ... command you need to run in order to have it succeed. Once an RVM install has succeeded, you have a workable Rails dev machine. Full stop. > • Bundler: is it installed with Ruby of will I need to install it > separately? Bundler is a dependency of Rails, so gem install rails will mean you have it. > • Node.js: the RailsApps project says that "for development on Ubuntu > Linux it is best to install the Node.js server-side JavaScript environment". apt-get install nodejs and you're done. You need to have "some" JS runtime to use Sprockets, but node is really easy to install and it's helpful for other things, say if you use some JavaScript that is distributed with NPM. > • Web server: what local web server would you suggest? WEBrick? Apache? > The tutorial uses WEBrick. Unless you are hosting your app from your dev machine, just stay with WEBrick, or install Thin or Puma (add them as gems in your app's Gemfile in the development/test group) and the app will run with those instead. WEBrick is single-threaded, so if you do anything fancy with JavaScript callbacks, you will need a multi-threaded Web server in order to test your app adequately on your local machine. > • Git: Git is already installed with Ubuntu. Will that be enough? Try getting something with git clone https://github.com ... and see if it works, generally, if you can do that, you're set. Naturally you'll want to run your local app as a repository, and push it up to another server for safe-keeping. > > Would you recommend anything else? > Finally, I suppose I will need to find documentation on how to configure all > these applications: do you have any suggestion about that? When you're getting started, spend time doing lots of little apps, starting with the scaffold generator so you get a feel for the recommended structure of an app. Learn how to deploy it somewhere. Do this over and over until it becomes muscle memory. You don't want to have to think about this part of the problem. Even if you plan to use Heroku for the near term, learn how to deploy on Apache and Passenger (truly easy, once you do it twice). Then learn how to use Unicorn and nginx. Learn enough of the framework until it starts to disappear for you, and you start thinking logically about your problem, and less about how you are going to shoe-horn it into the framework. Good luck, and have fun! Walter > > Many thanks in advance > > -- > 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-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/57b1277f-535c-4a6f-b830-3006f5d599be%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/79586761-7C0A-47A0-B027-9B91F09882B6%40wdstudio.com. For more options, visit https://groups.google.com/d/optout.