background preloader

POUR RUBY

Facebook Twitter

Create Rails apps. Faster. The Ruby Toolbox - Know Your Options! The Elegant Ruby Web Framework - Padrino Ruby Web Framework. 12 Small Web Frameworks for Ruby Developers. Automatic Rails Code. 10 ressources pour vos projets Ruby.

SINATRA

Ruby on Rails Guides. Creating Static Sites in Ruby with Rack. This article was contributed by Marshall Huss Marshall is the creator of Nezumi, the mobile app for Heroku.

Creating Static Sites in Ruby with Rack

Last updated 09 September 2015 markdown This article includes contributions from Lee Reilly. Lee is a toolsmith hacking on GitHub Enterprise. Static sites are sites that don’t contain any dynamic server-side functionality or application logic. Using the Rack framework, static sites can be quickly deployed to Heroku. Prerequisites This guide assumes you have the following: Create directory structure Run the following command to create the directory structure for Rack to serve static files: $ mkdir -p site/public/{images,js,css} $ touch site/{config.ru,public/index.html} $ cd site && bundle init This will create the following directory structure: - site |- config.ru |- Gemfile |- public |- index.html |- images |- js |- css Specify dependencies Many dynamic applications require dozens of third-party libraries and frameworks to run.

Source ' gem 'rack' File server configuration Running locally. Getting Started with Rails. 1 Guide Assumptions This guide is designed for beginners who want to get started with a Rails application from scratch.

Getting Started with Rails

It does not assume that you have any prior experience with Rails. Rails is a web application framework running on the Ruby programming language. If you have no prior experience with Ruby, you will find a very steep learning curve diving straight into Rails. There are several curated lists of online resources for learning Ruby: Be aware that some resources, while still excellent, cover versions of Ruby as old as 1.6, and commonly 1.8, and will not include some syntax that you will see in day-to-day development with Rails. 2 What is Rails?

Créer un site de zéro avec Ruby on RailsGeek Me Up – Devenez Geek ! Ruby on Rails est un framework web (rassemblement d’outils pour simplifier le développement de site internet), basé sur le langage Ruby qui permet de créer des applications web très puissantes et d’écrire du code avec une très grande productivité.

Créer un site de zéro avec Ruby on RailsGeek Me Up – Devenez Geek !

Cette technologie est aujourd’hui très en vogue dans le monde des startup comme le montre la liste (non exhaustive) des sites construits sur ce framework : airbnb.com, github.com, basecamp.com, twitter.com (V1), groupon.com, etc… Si vous créez une entreprise dans le secteur de l’Internet, que vous êtes responsable technique ou tout simplement que vous voulez apprendre à développer un site internet, je vous invite très fortement à lire les mots qui suivent. Introduction : quelle technologie utiliser? Le choix d’une technologie web pour réaliser un site web professionnel est une décision importante car : Sans entrer dans le détail, je classerai les technologies de création de site web en trois grandes familles :

ROR French Casts. Tutoriel Ruby on Rails : Apprendre Rails par l'exemple. Michael Hartl Avant-propos Ma précédente compagnie (CD Baby) fut une des premières à basculer intégralement vers Ruby on Rails, et à rebasculer aussi intégralement vers PHP (googlez-moi si vous voulez prendre la mesure du drame).

Tutoriel Ruby on Rails : Apprendre Rails par l'exemple

On m'a tellement recommandé ce livre Michael Hartl que je n'ai pu faire autrement que de le lire. C'est ainsi que le Tutoriel Ruby on Rails m'a fait revenir à nouveau à Rails. Bien qu'ayant parcouru de nombreux livres sur Rails, c'est ce tutoriel-là qui m'a véritablement « mis en possession » de Rails. La narration linéaire adoptée par ce tutoriel est vraiment un bon format. Régalez-vous ! Installer Ruby on Rails sur Mac OS X avec rbenv. Partie 1, la version de ruby par défaut Bonjour et bienvenue sur Hackademy, Aujourd'hui nous allons voir comment mettre en place un environnement ruby et ruby on rails fonctionnel sur OSX.

Installer Ruby on Rails sur Mac OS X avec rbenv

Notre environnement actuel est vierge et tourne sur Mountain Lion, c'est à dire Mac OSX 10.8. À l'heure ou je vous parle la distribution courante est la 10.9, mavericks. Il n'y a pas de choses particulières à savoir pour Mavericks, vous pouvez donc dérouler le processus de la même façon. Installer Ruby on Rails sur Mac OS X avec rbenv. Setup Ruby On Rails on Mac OS X 10.9 Mavericks - GoRails. A guide to setting up a Ruby on Rails development environment This will take about 30 minutes.

Setup Ruby On Rails on Mac OS X 10.9 Mavericks - GoRails

We will be setting up a Ruby on Rails development environment on Mac OS X 10.9 Mavericks. Older versions of OS X are mostly compatible so follow along as far as you can and then Google search for any problems you run into. There are plenty of people who have documented solutions for them. First, we need to install Homebrew. Setup Ruby On Rails on Mac OS X 10.10 Yosemite - GoRails. A guide to setting up a Ruby on Rails development environment This will take about 30 minutes.

Setup Ruby On Rails on Mac OS X 10.10 Yosemite - GoRails

We will be setting up a Ruby on Rails development environment on Mac OS X 10.10 Yosemite. Older versions of OS X are mostly compatible so follow along as far as you can and then Google search for any problems you run into. There are plenty of people who have documented solutions for them. First, we need to install Homebrew. Ruby on Rails Tutorial (3rd Ed.) #82 HTTP Basic Authentication. HttpAuthentication. Makes it dead easy to do HTTP Basic authentication.

HttpAuthentication

Simple Basic example class PostsController < ApplicationController http_basic_authenticate_with name: "dhh", password: "secret", except: :index def index render plain: "Everyone can see me! " end def edit render plain: "I'm only accessible if you know the password" endend Advanced Basic example Here is a more advanced Basic example where only Atom feeds and the XML API is protected by HTTP authentication, the regular HTML interface is protected by a session approach: class ApplicationController < ActionController::Base before_action :set_account, :authenticate protected def set_account @account = Account.find_by(url_name: request.subdomains.first) end def authenticate case request.format when Mime::XML, Mime::ATOM if user = authenticate_with_http_basic { |u, p| @account.users.authenticate(u, p) } @current_user = user else request_http_basic_authentication end else if session_authenticated?

Namespace Methods decode_credentials.