background preloader

Ruby

Facebook Twitter

Reactive Rails (2021)

Parslet - About. Optimist. Optimist is a commandline option parser for Ruby that just gets out of your way.

Optimist

One line of code per option is all you need to write. For that, you get a nice automatically-generated help page, robust option parsing, and sensible defaults for everything you don't specify. Features Dirt-simple usage. Single file. To install, you have three options: Optimist is a single file with no dependencies. To hack on it, command your computer to git clone or see the Optimist GitHub page. To understand, read the examples below, the FAQ, and the API docs. Examples Simple Optimist::options returns a hash of values. Medium require 'optimist'opts = Optimist::options do version "test 1.2.3 (c) 2008 William Morgan" banner <<-EOS Test is an awesome program that does something very, very important. You can specify a version and some banner text for the help message. Sub-commands, a la SVN and Git Specialized parsing behavior Sometimes calling Optimist::options does too much for us.

Contributors. 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. 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. 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"

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.