Ruby on Rails mensagens de erro: {{attribute}} {{message}}

Você provavelmente vê essas mensagens de erro quando roda Rails 2.3.8 ou mais antigo no mesmo servidor com o novo Rails 3 para cima.

Para arrumar isso existe 2 possíveis soluções:

Solução 1:

  1. Crie o arquivo: config/preinitializer.rb
  2. Com o conteúdo abaixo:
    require 'rubygems'
    begin
      gem 'i18n', "~> 0.4.0"
    rescue LoadError
      # no biggie, optional anyway
    end
  3. Reinicie o servidor web

Solução 2:

No terminal:

gem uninstall i18n
gem install i18n -v 0.4.0

Por favor recomende-me se esse post ajudou você: Recommend Me

Posted in Ruby on Rails at maio 24th, 2012. No Comments.

How to resolve “Could not find a JavaScript runtime” with Ruby on Rails App

If you tried to start Rails server and got this error:

/usr/lib/ruby/gems/1.8/gems/execjs-1.3.0/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)

In Ubuntu, you can fix it installing node.js:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install nodejs-dev

If you have other OS please look here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager

After you should starting Rails server with successful.

Please recommend me if this post help you: Recommend Me

Posted in Ruby on Rails, Ubuntu at março 1st, 2012. No Comments.

How do you downgrade Rubygems?

In the terminal:

sudo gem update --system 1.3.6

If you use RVM (Ruby Version Manager):

rvm install rubygems 1.3.6
Posted in Ruby at janeiro 19th, 2012. No Comments.

 Assinar RSS Feed