messaliberty

about hulor and us

[Ruby on Rails] Didn’t apply edited view file

With Ruby on Rails 2.3.2

Sometimes, edit rails view file like app/view/users/edit.html.erb, but didn’t apply it.
Draws page with old (before edit) view.

Reason

In app/view/* directory, like app/view/users,
there might be files like edit.html.erb.~BASE~ ends with “.html.erb.*”.
Then rails draw pages with view file that ends with “.*”.

svn (subversion) makes .~BASE~ files when compare working file with old revision file.

How to resolve

remove .*~BASE~ files like this:

 % cd project_dir
 % find . -name "*html.*"
 ./app/views/userss/edit.html.erb.~BASE~
 ./app/views/userss/show.html.erb.~BASE~
 % find . -name "*.~BASE~" -exec rm {} \;
Share with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • E-mail this story to a friend!
  • Technorati
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz

Review of the Logitech S7500 webcam (Communicate Deluxe)

If you are looking for a webcam for your mac mini then this might be the solution for you. The problem with the mac mini is that it doesn’t have a microphone socket so what you really need is a webcam with a built-in USB mic. And that is exactly what the Logitech S7500 (also known as the QuickCam Communicate Deluxe) has.

Let me run down the hardware specs of the S7500

  • 1.3 Megapixel resolution
  • 30fps video
  • Glass lens
  • RightLight2
  • Manual focus
  • Privacy shutter
  • USB mic built in
  • UVC

If you are using this webcam with Windows then the last feature Universal Video Class isn’t that important because it has a full driver suite. It may come in handy though as you can use it driver-less, though Logitech doesn’t recommend this. But for OSX or Linux it is a vital feature. Plug it into OSX Leopard and it is recognized and select USB mic input and it just works.

So how does perform? Read the rest of this entry »

Share with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • E-mail this story to a friend!
  • Technorati
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz

Multi-lingual WordPress Admin Screens

As mentioned in messa.tv episode 004 we have set-up multi-lingual admin screens in WordPress.  It means that each user can choose to have the admin interface in their own language.  You can’t believe how useful this is in a multi-lingual company such as ours and how long I’ve searched for the solution.

We used a plugin called tam-mothertongue written by Miyoshi-san.  It didn’t work for WordPress 2.7 but Miyoshi-san sent me a quick fix that got it working.  And now he’s released an updated version and renamed it bogo (which is mothertongue in Japanese). Please help spread the word about this wonderful and useful plugin by blogging about it in your own language.

You can find his announcement post about the bogo plugin here.

Share with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • E-mail this story to a friend!
  • Technorati
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz

[Ruby on Rails] uninitialized constant ActiveSupport::~::ForRspec

Today I got an error below with rake.
What happened?

% rake -T
(in /home/ice/messa/hulor)
rake aborted!
uninitialized constant ActiveSupport::Testing::SetupAndTeardown::ForRspec
/home/ice/messa/hulor/Rakefile:12
(See full trace by running task with --trace)

Related gem packages version:

  • rails 2.3.2
  • rspec 1.2.4
  • rspec-rails 1.2.4

I can’t remember what I did. But maybe I installed rails into my project (not on system).
I did below???? I can’t remember.

% rake rails:freeze:edge

#801 ‘No such file to load’ when running ‘rake spec’

Sounds like you’ve got rails edge, not rails-2.3.2. These files moved post-2.3.2 - same with ForRspec - that’s all in rails edge, which is now moving towards rails-3.0, and is not supported by rspec yet in any released version, nor in rspec’s own edge.

This says I installed rails edge, not railse 2.3.2.
To fix this probrem execute this command.

% rake rails:freeze:edge RELEASE=2.3.2
% rake rails:freeze:edge RELEASE=2.3.2
(in /home/ice/messa/hulor)
cd vendor
Downloading Rails from http://dev.rubyonrails.org/archives/rails_2.3.2.zip
Unpacking Rails
rm -rf rails
rm -f rails.zip
rm -f rails/Rakefile
rm -f rails/cleanlogs.sh
rm -f rails/pushgems.rb
rm -f rails/release.rb
touch rails/REVISION_b10fb7e7bcb5efea6c93ae52bad125887cfc235c
cd -
Updating current scripts, javascripts, and configuration settings

fixed. //

Share with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • E-mail this story to a friend!
  • Technorati
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz

messa.tv episode #004

Moved to messa.tv
http://messa.tv/2009/04/episode-004/

Share with others:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Reddit
  • StumbleUpon
  • E-mail this story to a friend!
  • Technorati
  • MySpace
  • Tumblr
  • TwitThis
  • Yahoo! Buzz