Wednesday, April 27, 2011
Solution for: Black screen on remote windows 7 computer after logging in
Using "CTRL+ALT+END" and choosing "Start task manager" to activate the desktop.
Friday, April 1, 2011
Ruby on Rails Error: Mysql::Error: You have an error in your SQL syntax
Problem:
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2:
SELECT profiles.id FROM profiles
WHERE profiles.person_id = #<Mysql::Result:0x7f53e9ca31b0>;
The rb code for this:
SELECT profiles.id FROM profiles
WHERE profiles.person_id = #{person_id};").to_a.flatten
Solution:
SELECT 'profiles.id' FROM profiles
WHERE 'profiles.person_id' = '#{person_id}'").to_a.flatten
The reason for this is :
Any values which are not numeric will need to be quoted.
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 2:
SELECT profiles.id FROM profiles
WHERE profiles.person_id = #<Mysql::Result:0x7f53e9ca31b0>;
The rb code for this:
SELECT profiles.id FROM profiles
WHERE profiles.person_id = #{person_id};").to_a.flatten
Solution:
SELECT 'profiles.id' FROM profiles
WHERE 'profiles.person_id' = '#{person_id}'").to_a.flatten
The reason for this is :
Any values which are not numeric will need to be quoted.
Ruby on Rails Error: rake aborted undefined method `generate_best_match=' for ActionDispatch::Routing:Module
Solutions:
Be sure you delete
Be sure you delete
config/initializers/new_rails_defaults.rb. It is no longer necessary (per its own comments) and in fact causes a weird exception if you don’t remove it:
Ruby on Rails Error: rake db:create uninitialized constant Mysql
Solution:
1) Add the following line to the Gemfile
gem 'mysql'
2) Rerun
bundle install
1) Add the following line to the Gemfile
gem 'mysql'
2) Rerun
bundle install
Subscribe to:
Comments (Atom)