background preloader

Ruby

Facebook Twitter

Traveling Ruby: self-contained, portable Ruby binaries. Chef/omnibus. How To Install Ruby on Rails with rbenv on Ubuntu 14.04. Introduction Ruby on Rails is an extremely popular open-source web framework that provides a great way to write web applications with Ruby.

How To Install Ruby on Rails with rbenv on Ubuntu 14.04

This tutorial will show you how to install Ruby on Rails on Ubuntu 14.04, using rbenv. This will provide you with a solid environment for developing your Ruby on Rails applications. rbenv provides an easy way to install and manage various versions of Ruby, and it is simpler and less intrusive than RVM. This will help you ensure that the Ruby version you are developing against matches your production environment. Prerequisites Before installing rbenv, you must have access to a superuser account on an Ubuntu 14.04 server. When you have the prerequisites out of the way, let's move on to installing rbenv. Install rbenv Let's install rbenv, which we will use to install and manage our Ruby installation. First, update apt-get: sudo apt-get update. Planetruby/awesome-rubies.

Rails and js

Tutorial. 14 Top Ruby On Rails Development Resources. Ruby on Rails (RoR) is an open source web development framework, which runs amongst the Rails program.

14 Top Ruby On Rails Development Resources

Coding on this can be done using a number of helpful resources. In fact, most programmers prefer to utilise these resources in order to optimise their outputs. Here are 14 of the best available RoR resources. 1. ActiveScaffold.com This is a successor to the well known AjaxScaffold plugin. An AJAXified table interface for creating, updating, and deleting objects Automatic handling of ActiveRecord associations Sorting, Search and Pagination Graceful JavaScript degradation RESTful API support (XML/YAML/JSON) baked in CSS styling and them support More extension points than you can shake a stick at Guaranteed to work on Firefox 1+, IE 6+ and Safari 2+ Released under the MIT License, the same one as Rails itself, so you can use it freely in your commercial applications. 2. Rails vs Django: an in-depth technical comparison. I’d like to start with a disclaimer.

Rails vs Django: an in-depth technical comparison

I have been developing websites using Django for 3 years now and it’s no secret that I like Django. I wrote an open-source app for it and I have started sending patches to Django. I have however written this article to be as unbiased as possible and there’s plenty of compliments (and criticism) to both frameworks. Six months ago I joined a project at my University using Ruby on Rails and have been working with it since then.

The first thing I did was to look for for reviews and comparisons between the two frameworks and I remember being frustrated. A short introduction Both frameworks were born out of the need of developing web applications faster and organizing the code better. Bernat Farrero » jQuery and Rails 3: A mini tutorial. jQuery and Rails 3: A mini tutorial As most of Rails developers, recently I’ve been through a process of unlearning all concepts of older versions of Rails and learning again the new ones of 3.

Bernat Farrero » jQuery and Rails 3: A mini tutorial

But hey! I must admit that so far it’s been more pleasure than pain as things only get simpler and more natural than they used to be! Here I’d like to talk about how simple it has become to integrate unobtrusive jQuery to a Rails app. Let’s use as an example a system of comments. Start typing in your teminal: rails myCommentsApp rails g resource Comment name:string body:text rake db:migrate Then we have to include the jQuery library and the jQuery driver file and place it inside /public/javascripts/ (or grab the helpers generator of Code Officer and do it automatically if you wish).

Javascript_include_tag " javascript_include_tag " javascript_include_tag "jquery-rails.js" Now let’s add some logic to our program. And the views for the index will look like this:/app/views/comments/index.html.erb. 10 Most Common Rails Programming Mistakes. Ruby on Rails (“Rails”) is a popular open source framework, based on the Ruby programming language that strives to simplify and streamline the web application development process.

10 Most Common Rails Programming Mistakes

Rails is built on the principle of convention over configuration. Simply put, this means that, by default, Rails assumes that its expert developers will follow “standard” best practice conventions (for things like naming, code structure, and so on) and, if you do, things will work for you “auto-magically” without your needing to specify these details.

While this paradigm has its advantages, it is also not without its pitfalls. Most notably, the “magic” that happens behind the scenes in the framework can sometimes lead to headfakes, confusion, and “what the heck is going on?”

Rails 4+

Rails app deployment. OCRA: One-Click Ruby Application Builder. I recently mentioned the fact that RubyScript2Exe 0.5.3 doesn't play well with recent versions of RubyGems.

OCRA: One-Click Ruby Application Builder

At the end of that post I mentioned that there are alternatives emerging for creating executables from your Ruby code, including Lars Christensen's OCRA, the One-Click Ruby Application Builder. I've had a chance to take OCRA for a short test drive and it looks promising. Like Erik Veenstra's RubyScript2Exe, OCRA lets you "compile" your ruby code into an EXE file that you can distribute to others, without requiring that the users have Ruby installed on their PCs. To quote the OCRA page: The executable is a self-extracting, self-running executable that contains the Ruby interpreter, your source code and any additionally needed ruby libraries or DLL.

OCRA can be installed via RubyGems: open a console window and type: gem install ocra It's also available from the RubyForge page. The syntax to compile a script is... ocra.rb [option] your/script.rb.