KEEP IN TOUCH

Join Newsletter

CALL NOW

Share with:


Recent Posts





Jason Fleetwood-Boldt

How can I search for available rake tasks? rake -T | grep gem (where "gem" is the thing you are searching for) The above example will return all of the rake tasks relating to gems: rake gems ...

Read More

Gems are installed by sources, or a repository which holds several gems. Generally all the gems you will need are either in gems.rubyforge.org or gems.github.com, so once you setup these two sources you don't need to setup more sources until you need a gem from...

Read More

Make a quick dump of a mysql database: mysql_dump db_name > backup-file.sql You can then read that dump file back into the server like this mysql db_name < backup-file.sql or like this: mysql -e "source /path/to/backup/backup-file.sql" db_name ...

Read More

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