The following error appeared after I have upgraded RubyGems via gem update –system : Undefined method `load_yaml’ for Gem:Module To fix it, I just had to restart the webserver (e.g. Apache via /etc/init.d/apache2 restart)
Posts Tagged ‘Ruby on Rails’
YAML parsing errors in Rails 3.0.x application (couldn’t parse YAML)
I’ve just got this error in my Rails 3.0.7 application: Psych::SyntaxError (couldn’t parse YAML at line 289 column 14) To fix this I needed to add require ‘yaml’ YAML::ENGINE.yamler= ‘syck’ into my first two lines of the config/boot.rb
Twitter says goodbye to Ruby on Rails
The guys at Twitter are moving away from their Ruby on Rails front-end servers towards their customized Java server Blender which is based on good old Netty. In the next phase of our deploy, we will eliminate Ruby on Rails entirely, connecting users directly to Blender and potentially reducing latencies even further. (via twitter.com)
Ruby on Rails support dropped in Netbeans 7
What a pity. I really liked the Ruby support in Netbeans. After thorough consideration, we have taken the difficult step to discontinue support for Ruby on Rails in the NetBeans IDE. Two main issues underpin this decision: Java SE 7 and Java Development Kit 7 (JDK 7) are the next major releases of the Java [...]
Creation of nested models in Rails3 failed with HashWithIndifferentAccess error
I just tried to create a Rails model which contained nested other models and got an HashWithIndifferentAccess error. I used accepts_nested_attributes_for in the parent model. To solve this problem the solution was to add an attr_accessible :MODELNAME_attributes for the child-model (MODELNAME) into the parent model. E.g. Parent model class ParentModel < ActiveRecord::Base has_one :child_model attr_accessible [...]
xss_terminate – protect your Ruby on Rails code from XSS
Just found this little plugin which is maybe interesting to protect against Cross-site scripting in Ruby on Rails. xss_terminate is a plugin in that makes stripping and sanitizing HTML stupid-simple. Install and forget. And forget about forgetting to h your output, because you won‘t need to anymore. via xssterminate – Project Hosting on Google Code.
RMagick is not accepting ImageMagick version
I just updated couple of gems and got this message while trying to start the WEBrick server: This installation of RMagick was configured with ImageMagick 6.5.1 but ImageMagick 6.5.7-8 is in use. One temporary solution (besides downgrading ImageMagick) is to avoid the version checking by adding RMAGICK_BYPASS_VERSION_TEST = true into your environment.rb for example.
Rails3 screencasts
Some really nice informative screen casts for Ruby on Rails3: rubyonrails.org/screencasts/rails3. For example the new ActionController architecture (AbstractController, respond_to etc.).
Freezing Ruby on Rails applications
To freeze a Ruby on Rails application to a specific version of Rails (e.g: 2.3.5) just execute the following Rake command in your projects root directory. rake rails:freeze:edge RELEASE=2.3.5
Running rake tasks in different environments
To run Rake tasks with Ruby on Rails in different environments, you just provide the necessary variable when starting the task: $ RAILS_ENV=staging rake db:migrate In this case we are starting the migration tasks in an environment called staging. You can of course also provide the standard environments like development, test or production.
Follow me on the following platforms if you like: