Archive for 2011

  • Installing the capybara-webkit gem

    October 31, 2011


    This post was originally published in the Rambling Labs Blog on October 31, 2011.


    To install the capybara-webkit gem, you need to have the libqt4-dev installed. So run:

    apt-get install libqt4-dev
    gem install capybara-webkit
    

    You should be good to go!

    Continue Reading →

  • Rails 3.1 - Translating routes

    October 26, 2011


    This post was originally published in the Rambling Labs Blog on October 26, 2011.


    Today, I was wondering if there would be a way to add translated routes automatically in Ruby on Rails. This is for a project I’m currently working on, whose users speak mostly spanish, so I want to make them happy with urls like “/contacto”, “/quienes-somos” and “/trabajos/1” instead of “/contact”, “/about-us”, and “jobs/1”.

    So, I googled and there it was: the i18n_routing gem.

    This reminded me one more time how awesome is the Ruby community, which is definitely one of the main reasons why I’m loving Ruby and Rails so much.

    So back on topic, the gem is easy to install, and only depends on the i18n gem. Run gem install i18n_routing and you should be good…

    Continue Reading →

  • jQuery Rambling Slider v0.1.1 is out!

    October 23, 2011


    This post was originally published in the Rambling Labs Blog on October 23, 2011.


    Yesterday, I released v0.1.0 of the jQuery Rambling Slider and, as it happens with with all software development, some bugs were found. But hey, I took the time to fix them and now the v0.1.1 is out!

    Among the fixed issues:

    • Some effects not working with the default settings.
    • Flaky ‘boxRandom’ effect (some boxes not showing).
    • Control Navigation not showing when styled to be outside of slider (negative margin and hidden overflow).

    Let me know if you find any other issues. Major refactoring is up for next release.


    UPDATE Version 0.1.2 was released.


    :D

    Continue Reading →

  • jQuery Rambling Slider has been released!

    October 22, 2011


    This post was originally published in the Rambling Labs Blog on October 22, 2011.


    A while ago I was looking for a good image slider jQuery plugin to use on a project, and Nivo Slider turned out to be the best candidate. I made some modifications for my needs at the moment and issued a pull request, but had no luck. I also said that if my pull request didn’t get accepted or took too long to be accepted, I would release it myself.

    Guess what? I got tired of waiting, so here it is! I just uploaded my first stable release of the now called jQuery Rambling Slider. :)

    It’s still basically the same Nivo Slider with the tweaks I made in my fork. It’s now written in CoffeeScript, which I’m having a lot of fun with, while the compiled JavaScript…

    Continue Reading →

  • The nokogiri gem and the "libxslt is missing" error

    October 17, 2011


    This post was originally published in the Rambling Labs Blog on October 17, 2011.


    I ran into this issue today. But this one’s easy. Just run the following command and install the gem again:

    apt-get install libxslt1.1 libxslt1-dev libxslt-ruby
    

    That’s it! It should work fine now :).

    Continue Reading →

  • Using Postgresql with Rails 3.1: the 'pg' gem

    October 17, 2011


    This post was originally published in the Rambling Labs Blog on October 17, 2011.


    As you may know I’ve been learning Ruby on Rails for the last few weeks. I’m also currently developing an application using the edge version of RefineryCMS (which is really a Rails 3.1 application), integrated with the almighty Heroku.

    I wanted to use RefineryCMS with Postgresql, so the only thing that I had to do was installing postgresql and it’s corresponding gem ‘pg’… Or so I thought.

    I wasn’t surprised. About a year ago I had the same unfulfilled expectations with mysql and the mysql gem. So, this is what I had to do:

    • First, of course, install postgresql with apt-get install postgresql
    • Then, install the libpq-dev with apt-get install libpq-dev. Note…

    Continue Reading →

  • Refinery CMS, rails 3.1.1 and the Operation not permitted error Errno::EPERM

    October 14, 2011


    This post was originally published in the Rambling Labs Blog on October 14, 2011.


    The last couple of days, I’ve been trying to set up Refinery CMS for a project I’m working on. I’ve made a couple of Stack Overflow questions about which ruby on rails CMS supports multiple languages and custom types.

    Answers to both questions were directing me to Refinery CMS, so I had to test it out. But… I wanted it to be on rails 3.1 (either 3.1.0 or 3.1.1). So I googled for a while and found that Refinery CMS edge on github does support rails 3.1.

    So I set up my Refinery CMS local test under my Ubuntu virtual machine by first downloading the edge code from github, like this:

    git clone git://github.com/resolve/refinerycms.git ~/refinerycms-edge
    

    Then…

    Continue Reading →

  • Rails 3.1 "rails console" fails with "no such file to load -- readline"

    October 12, 2011


    This post was originally published in the Rambling Labs Blog on October 12, 2011.


    Yesterday, I was trying to run the rails console command on Ubuntu with ruby 1.9.2 and rails 3.1, without any success. I was getting a no such file to load -- readline error. This kind of error was sort of familiar for me (I had the common no such file to load -- zlib and the not so common no such file to load -- openssl a while ago). So this was probably another package that I was missing.

    Turns out that as I found in a Stack Overflow question, I needed the libreadline-dev, which I didn’t have installed. But I also needed to recompile ruby, seriously!?

    This is where rvm comes to the rescue, and why I love so much to have rvm installed :D. You only need…

    Continue Reading →

  • Rails 3.1 smtp gmail Errno::ECONNREFUSED Connection refused

    October 9, 2011


    This post was originally published in the Rambling Labs Blog on October 9, 2011.


    I was trying out the rails 3.1 smtp mailer on the sandbox application I use to test all the new stuff and it was throwing this error:

    Errno::ECONNREFUSED in TestController#create
    
    Connection refused - connect(2)
    

    And I had this configuration on config/environments/development.rb:

    Demo::Application.configure do
      # ...
      config.action_mailer.delivery_method :smtp
      config.action_mailer.smtp_settings = {
        enable_starttls_auto: true,
        address: 'smtp.gmail.com',
        port: 587,
        domain: 'gmail.com',
        authentication: 'plain',
        user_name: '<email@yourdomain.com>',
        password: '<password>'
      }
      # ...
    end
    

    I tried quite a number of combinations for…

    Continue Reading →

  • Android Market not showing all installed apps

    October 9, 2011


    This post was originally published in the Rambling Labs Blog on October 9, 2011.


    As you may have read a couple of days ago, I had a lot of issues with the market when I installed Cyanogenmod7.1.0-RC1 on my HTC Inspire 4G. But thankfully, I solved that and I thought that was it.

    In the last few days though, I noticed that the apps weren’t updating as often as I was used to. So I went to check my apps on the market and, to my surprise, only 2 apps where showing there. 2 apps from a list of 50+ apps that I have currently installed.

    The first thought that popped into my mind was “I messed it up”. And of course that was going to be my first thought after all the issues I went through.

    But no need to worry! If you are having this issue, just…

    Continue Reading →