RailsConf 09 - A-Z Intro To Rails Tutorial

April 29th, 2009

Next week I’ll be attending RailsConf 09 in Las Vegas, NV. Since I’m still pretty new to Rails I’m taking one of the tutorial classes “A-Z Intro to Rails Tutorial” and the presenter has already provided info from his site. Cool!

Mark Monica Programming, Ruby On Rails Blogs , ,

ROR Error: undefined method `include_root_in_json=’ …

March 6th, 2009

Background

Upon continuing a Ruby on Rails project after a few months delay, Aptana Studio’s RadRails editor installed some updates.  I suspect something that  changed in Rails itself (GEM update) caused the error I received.

Error Message

undefined method `include_root_in_json=’ for ActiveRecord::Base:Class (NoMethodError)

Solution

To fix this error rename the config/initializers/new_rails_defaults.rb to config/initializers/new_rails_defaults.rb.bak.

It appears that the old code placed in these files no longer works with ROR 2.0.2.

# These settings change the behavior of Rails 2 apps and will be defaults
# for Rails 3. You can remove this initializer when Rails 3 is released.

# Include Active Record class name as root for JSON serialized output.
ActiveRecord::Base.include_root_in_json = true

# Store the full class name (including module namespace) in STI type column.
ActiveRecord::Base.store_full_sti_class = true

# Use ISO 8601 format for JSON serialized times and dates.
ActiveSupport.use_standard_json_time_format = true

# Don’t escape HTML entities in JSON, leave that for the #json_escape helper.
# if you’re including raw json in an HTML page.
ActiveSupport.escape_html_entities_in_json = false

The file now created in a new project appears as follows:

# These settings change the behavior of Rails 2 apps and will be defaults
# for Rails 3. You can remove this initializer when Rails 3 is released.

if defined?(ActiveRecord)
# Include Active Record class name as root for JSON serialized output.
ActiveRecord::Base.include_root_in_json = true

# Store the full class name (including module namespace) in STI type column.
ActiveRecord::Base.store_full_sti_class = true
end

# Use ISO 8601 format for JSON serialized times and dates.
ActiveSupport.use_standard_json_time_format = true

# Don’t escape HTML entities in JSON, leave that for the #json_escape helper.
# if you’re including raw json in an HTML page.
ActiveSupport.escape_html_entities_in_json = false

Footnotes

See  http://www.hostingrails.com/1461/dbmigrate-undefined-method-include_root_in_json for more help with this error.

Mark Monica Programming, Ruby On Rails Blogs , , , , , ,

Free net monitoring tool gets a makeover

April 29th, 2008

Spiceworks simply put is an IT/Network Managers best friend. Best of all - it is FREE! Building on Spiceworks strong foundation that allows IT Managers to inventory hardware, software, and other devices via WMI the new Beta 3 now allows it’s built in Help Desk to operate via LDAP and performs testing of your Exchange server. The review on Network World doesn’t do the product much justice because simply put this product is a must have. It easily saves me hours of time and notifies me of any problems that otherwise would have gone undetected. Try it for yourself. I often wonder how I lived without this software before.

Beta 3 - http://community.spiceworks.com/topic/13852
Spiceworks v2.1 - http://www.spiceworks.com/

Mark Monica Networking, Software

The Next Social Network: WordPress

December 12th, 2007

Watch out MySpace you are about ready to be replaced.

With all the problems that plague the giant online meeting place, a shift to person-centric social networking is primed to take some share of users from MySpace and Facebook.  After all why would you want to rent space when you can own your own home.

WordPress and its upcoming sister product bbPress are offering a multitude of options for users who would are making the switch from social networking to blogging.  Why not start your WordPress site today?

Reference:

http://gigaom.com/2007/12/11/the-next-social-network-wordpress/

Mark Monica Blogging, WordPress , ,

How To: Firefox and Integrated Windows Authentication

November 20th, 2007

Do you have an Intranet or a similar web site that requires the use of Integrated Windows Authentication? If so the default Firefox browser settings will always prompt you for a username and password first before accessing a site using Integrated Window Authentication.

Fortunately Firefox has the slick ability to easily modify it’s configuration to use Integrated Windows Authentication.

How to configure Firefox

  1. Open Firefox
  2. In the address bar type: about:config
  3. Firefox3.x and later requires you to agree that you will proceed with caution.
  4. After the config page loads, in the filter box type: network.automatic
  5. * Modify network.automatic-ntlm-auth.trusted-uris by double clicking the row and enter http://www.replacewithyoursite.com
  6. * Multiple sites can be added by comma delimiting them such as http://www.replacewithyoursite.com, http://www.replacewithyourintranetsite.com

Package for Large Installs

If you are a network administrator that has a lot of installs to do, you can modify the Firefox installer.

  1. Use a tool such as 7-zip to extract Firefox Setup 2.x.x.exe
  2. Extract browser.xpi from the setup
  3. Edit all.js contained in browser.xpi contained in binjreprefs
  4. Modify the entries as in items 4 and 5 above
  5. Re-package browser.xpi and use the extracted setup to install Firefox

* Special Notes

To specify all subdomains use .replacewithyoursite.com instead of www.replacewithyoursite.com, help.replacewithyoursite.com, pictures.replacewithyoursite.com

Updated March 6, 2009

Mark Monica Networking, Software ,

Scientific Web Design: 23 Actionable Lessons from Eye-Tracking Studies

November 15th, 2007

Eye-tracking studies are hot in the web design world, but it can be hard to figure out how to translate the results of these studies into real design implementations. These are a few tips from eye-tracking studies that you can use to improve the design of your blog or site.

read more | digg story

Mark Monica Blogging, Programming, Software

Windows Live Writer and Integrated authentication - Community Server

November 8th, 2007

Recently Microsoft released Windows Live Writer, a blog authoring tool from its BETA hell to, well, Live.  The tool has a lot of promise and is a vast improvement over the default editor in Community Server.

If you are a corporate user of this software that uses Community Servers integrated login module, you were out of luck, sort of until I discovered a forum post by Telligent employee Kevin Harder.

Windows Live Writer and Integrated authentication - Community Server

Windows Live Writer does not natively support integrated logins at this point and requires a username and password to setup a Community Server Weblog account.  To do this you need to perform one of the following workarounds. Read more…

Mark Monica Blogging, Software