Posts Tagged ‘rails’

Hoje, ao tentar usar o rake spec:rcov para verificar a cobertura do meu código percebi que alguns testes de roteamento estavam falhando e a exceção lançada era a seguinte: undefined method `to_plain_segments’ for #<ActionController::Routing::RouteSet:0xb7659174> O mais estranho era que ao executar os testes do RSpec (rake spec) nenhum erro era detectado. Este erro ocorre por […]


When we create a new Rails project a database.yml is created for us, and it looks like this one: development: adapter: mysql encoding: utf8 database: project_development username: root password: password socket: /var/run/mysqld/mysqld.sock test: adapter: mysql encoding: utf8 database: project_test username: root password: password socket: /var/run/mysqld/mysqld.sock production: adapter: mysql encoding: utf8 database: project_production username: root password: […]


Ao criar um novo projeto rails é criado juntamente com o projeto um arquivo database.yml parecido com este: development: adapter: mysql encoding: utf8 database: project_development username: root password: password socket: /var/run/mysqld/mysqld.sock test: adapter: mysql encoding: utf8 database: project_test username: root password: password socket: /var/run/mysqld/mysqld.sock production: adapter: mysql encoding: utf8 database: project_production username: root password: password […]


When I am trying to use rubygems on Ubuntu 7.10 I took this error: “rubygems/custom_require.rb:27:in `gem_original_require’: no such file to load — sources (LoadError)” This error occurs when GEM_HOME system variable is unset. To solve that first check your gems directory: # locale will find occurrences of gems on the system # look for the […]