background preloader

Ruby

Facebook Twitter

RSpec intro and how I test. ZaragozaRb. About me Developer at Sonicbyte Dan north ...observed that developers he was coaching were having a tough time relating to TDD as a design tool and came to the conclusion that it had a lot to do with the word test RSpec RSpec was created by Steven Baker (@srbaker) in 2005 What is RSPEC RSpec provides a Domain Specific Language for specifying the behaviour of objects.

RSpec intro and how I test. ZaragozaRb

Why RSpec? Syntax / readabilitySyntax / readabilitySyntax / readability Code Example describe MovieList do context "when first created" do it "should be empty" do movie_list = MovieList.new movie_list.should be_empty end end end Installation. Railsberry. Know Your Options! Untangling the Rails Asset Pipeline – Part 4: Troubleshooting. You’re reading the last installment of a four-part series on the Rails asset pipeline.

Untangling the Rails Asset Pipeline – Part 4: Troubleshooting

The previous entries are Caches and Compass, Production, and Configuration. Table of Contents Help! My production site is completely unstyled In this scenario you deploy to production, load your site and find that the HTML source code is fine, but no CSS is loading at all. I made this mistake myself when first experimenting with Rails 3.1. Bundle exec rake assets:precompile This is needed because Rails by default does not generate or serve its CSS assets in production, so you need to compile them beforehand. I’ve precompiled, but styles still don’t load If you’ve precompiled, double-check that compilation actually worked by listing the contents of the public/assets directory of your application on the production server: ls -l public/assets You should see compiled and cache-busted versions of all your CSS, JS and image assets. Config.serve_static_assets=true My main stylesheet works, but others do not Notes.

Cucumber - Making BDD fun. Rubular: a Ruby regular expression editor and tester. CMS Ruby. Ruby on Rails. RailsInstaller. Rails Development on Windows. Seriously. I love Windows.

Rails Development on Windows. Seriously.

I love how stupidly easy it is for browsing the web, checking email, or writing Word documents (if you actually still do that). I love that Windows is everywhere and even my grandmother can use it. At the same time, I also HATE Windows. If you're trying to program anything besides .NET, it's an uphill battle. The title of this post is 'Rails Development on Windows. The Past Don't tell anyone because it might ruin my street-cred, but I started programming Ruby on Rails in a Windows environment. Yes, you can all shudder in fear. As bad as that release was, I made the most of it. Back then, there were basically two ways to install Rails on Windows: Install JRuby and run on top of the Java Virtual Machine Download the RubyInstaller executable and the DevKit and install everything manually I had no idea what JRuby really was or why I needed it and I really wasn't sure what I was doing in the first place so I opted for option two. The Present The Future.

How to configure WebDriver in Grails for your Geb Tests. There has been a bit of discussion in the Grails mailing list about the lack of documentation on configuring webdriver for Geb.

How to configure WebDriver in Grails for your Geb Tests.

In this post, I will outline the steps you will need to configure the following browsers: FirefoxChromeInternet ExplorerSauce Labs / Remote WebdriverPhantomJS HTMLUnit won’t be covered because it is broken for grails 2.2 and you shouldn’t be using HTMLUnit. To start, open up your BuildConfig.groovy file. Add the following dependency under the plugin block: Add the following dependencies in your dependencies block: Versions of plugins may vary so check them on maven central before adding them.

Create a blank file called GebConfig.groovy in your test/functional/ directory. Here is a sample geb test to check that your configurations are set up correctly. Also, since this file is a GebReportingSpec (i.e, takes a snapshot of your test after executing and keeps a copy of the html file), you need to set a reporting directory in the GebConfig.groovy file. Herramientas imprescindibles para un desarrollador de Ruby on Rails. Seguimos con los especiales acerca de cuáles son las herramientas imprescindibles a la hora de embarcarte en un proyecto con tu lenguaje y/o framework preferido.

Herramientas imprescindibles para un desarrollador de Ruby on Rails

En esta ocasión, os voy a describir las que yo considero más importantes para desarrollar aplicaciones en Ruby on Rails. Aunque estoy seguro que hay muchas otras que se os ocurren, así que os invito a que comentéis vuestras preferencias. El editor o IDE ¿Usar un editor ligero, o un IDE que lo abarque todo? El eterno dilema. No obstante, existen un buen número de IDEs para programar con Ruby on Rails que funcionan realmente bien, y que se pueden convertir fácilmente en tu centro de mando de todo el proyecto, gracias a su integración con sistemas de control de versiones, visor de base de datos, etc. Ruby on Rails Web Hosting - Your Guide To Finding Ruby Web Hosting For your Rails Applications. Ruby on rails, javascript, html5 y desarrollo ágil, en español. Geocodificación II.

Ruby on rails, javascript, html5 y desarrollo ágil, en español

Geocodificando del lado cliente con javascript. Si en la anterior entrada tratamos la geocodificación en el lado del servidor, ahora toca pensar en que no hay motivo para agobiar a nuestro servidor haciendo algo que puede hacer el navegador del cliente. Para ello vamos a hacer otra pequeña aplicación haciendo uso de la API javascript de google maps v3, donde un […] Geocodificacion, google maps, javascript, jquery, ruby on rails Rails-geocoder. La geolocalización está de moda. Geocoder, Geocodificacion, plugins, ruby on rails Sass. En la anterior entrada hablé de Haml, en lenguaje de marcado para plantillas que las hace mas simples, concisas, estilizadas y legibles.