KEEP IN TOUCH

Join Newsletter

CALL NOW

Share with:


Recent Posts





Jason Fleetwood-Boldt

operandwhat it does shift position of bits in Bignum and Fixnum ~bitwise NOT (high-presendence) &bitwise AND (medium-presendence) |bitwise OR (medium-presendence) ^bitwise XOR (medium-presendence) **exponent +addition -subtraction *multiplication /division %modulo operator ...

Read More

Go to script/console to open ruby in interactive mode. script/console loads your environments (everything in environment.rb and all your plugin and gem initializers), so you basically have access to all your models right from interactive ruby mode (IRB). Remember use of the p (or its...

Read More

Using Mac ports sudo port install ImageMagick If you have an existing ImageMagick installed, you will get this error: Error: Target org.macports.activate returned: Image error: Another version of this port (ImageMagick @6.4.3-6_0+q16) is already active. To remove the old version, try: sudo port uninstall ImageMagick @6.4.3-6_0+q16 ---> Deactivating ImageMagick @6.4.3-6_0+q16 --->...

Read More

1) be sure to put in your environment file (inside your initializer) config.gem "paperclip" 2) make sure your form_form has multipart set to true like this: { :multipart => true } do |f| %> 3) if using passenger, you must put this in config/initializers/paperclip.rb: if RAILS_ENV == "development" ...

Read More

Sometimes you're in script/console and you make a change to your model files, but since Ruby on reads the models when the environment loads, your change isn't reflected right away in your script/console environment. This will explicitly tell Ruby to reload the environment from scratch....

Read More

logger.debug WHAT_TO_OUTPUT ***** I think this syntax only works in controllers and outside of a controller you have to use rails_default_debugger ****** (where WHAT_TO_OUTPUT is a string or interpolated to be a string) The log is in your rails app: log/development.log...

Read More

A method defined on a model that ends with = is an assignment method, so when ActiveRecord is trying to save an attribute to this model, you can define a custom action to perform the save. Useful, for example, when passing a hash to this...

Read More

<h1>CUCUMBER FIRST STEPS</h1> Much of the online documentation for Cucumber dives right in. Here are some pointers for those very first cucumber steps for absolute newbies. I also recommend Ryan Bates's RailsCast for a good introduction. Step 1. Install & configure your gems: sudo gem install rspec...

Read More

when running tests, I'm getting an error: undefined method `use_transactional_fixtures=` for Test::Unit::testCase:Class (NoMethodError) This happens if you generated your tests before Rails 2.3 go to test/test_helper.rb and change: class Test::Unit::testCase to: class ActiveSupport::TestCase ...

Read More