nm --help otool --help
For example to determine the arch of a lib hit it with these commands(not the best way but it works)
nm -arch i386 libname nm -arch x86_64 libname
nm --help otool --help
nm -arch i386 libname nm -arch x86_64 libname
sudo env ARCHFLAGS="-arch x86_64" gem install id3lib-ruby -- --with-opt-dir=/opt/local
sudo env ARCHFLAGS="-arch i386" gem install id3lib-ruby -- --with-opt-dir=/sw
arch -i386 irb >> require 'id3lib' => true >> tag = ID3Lib::Tag.new('talk.mp3') => [] >>
download the source code and untar it;
http://github.com/robinst/id3lib-ruby (the upper right has the
download source link or just git it)
then do this;
export PATH=/sw export DYLD_LIBRARY_PATH=/sw/lib cd to/the/source sudo CONFIGURE_ARGS="--with-opt-dir=/usr/local" ruby setup.rbconfirm success with $ irb >> require 'rubygems' => false >> require 'id3lib' => true >>
<% form_for( @object, :url => {:action => 'update', :id => @object } :name => 'form') do |form| %>
option 1) disable the ssl and raise all the errors so we can see them in the environment.rb or an initializer somewhere it can't be done in the config
ActionMailer::Base::raise_delivery_errors = true ActionMailer::Base::smtp_settings[:enable_starttls_auto] = false
hostname openssl x509 -in /etc/ssl/certs/ssl-cert-snakeoil.pem -noout -text
make-ssl-cert generate-default-snakeoil --force-overwrite openssl x509 -in /etc/ssl/certs/ssl-cert-snakeoil.pem -noout -text
Here is how to switch to an active record store:
add the following line to config/environment.rb
config.action_controller.session_store = :active_record_storeThen to create the sessions table execute;
rake db:sessions:create rake db:migrate
For example if you code is a generic kind of setter function:
template <typename type> void GenericClass::set(type _val) { ((DataClass<type>*)holders[column])->set(_val); dirty = true; }
template void GenericRecord::setAssigns(int _val); template void GenericRecord::setAssigns(bool _val);
class GenericClass{ virtual void set(int _val): }; void set(int _val) { ((DataClass<type>*)holders[column])->set(_val); dirty = true; }
void GenericClass::set(int _val) { val = _val; dirty = true; }
class GenericClass{ static int _val; };
class GenericClass{ static int _val; }; int GenericClass::_val;
ActiveRecord::Base.connection.execute("SELECT * FROM users") ActiveRecord::Base.connection.execute("select * from customers").fetch_row results = ActiveRecord::Base.connection.execute("select * from customers") while row = results.fetch_row do # process row here end
Try this: Place a date_select that allows blanks into a form and then enter the date 2010, "", 31 -- IE no month and the day 31 and submit the form. The result is a crash from a MultiparameterAssignmentErrors exception.
I dont care why it was does it.. to me its wrong here is the fix;
module ActiveRecord class Base def assign_multiparameter_attributes(pairs) begin execute_callstack_for_multiparameter_attributes( extract_callstack_for_multiparameter_attributes(pairs)) rescue MultiparameterAssignmentErrors => e e.errors.each { |err| self.errors.add(err.attribute) } end end end end
class Relevance::Tarantula::MissingI18nTranslationHtmlHandler include Relevance::Tarantula def handle(result) begin response = result.response return unless response.html? if /translation missing/.match(response.body) error_result = result.dup error_result.success = false error_result.description = "Broken Translation" error_result end rescue end return nil end end class TarantulaTest < ActionController::IntegrationTest fixtures :all require 'ruby-debug' def test_tarantula login_all_users t = tarantula_crawler(self) t.handlers << Relevance::Tarantula::MissingI18nTranslationHtmlHandler.new t.crawl "/" end def login_all_users end end
The docs advise to unpack the gem into the vendors dir... and then add this the rake file
load File.join(RAILS_ROOT, Dir["vendor/gems/tarantula-*/tasks/*.rake"])
tarantula_path = Gem::required_location("tarantula", "") if tarantula_path Dir[ File.join(tarantula_path, "..","tasks","*.rake") ].each { |rakefile| load rakefile } end
(rdb:1) Customer.find(:all, :conditions => ["#{Address.table_name}.name_given = 'kdFJf6J6Mdx'"], :include => [:address, :shipping_address] ) [] (rdb:1) Customer.find(:all, :conditions => ["#{Address.table_name}.name_given = 'kdFJf6J6Mdx'"], :include => [:shipping_address, :address] ) [#<Customer id: 81, ...SNIP... >]
begin asd rescue => e logger.info "BACKTRACED HERE" bt = e.backtrace.delete_if{ |l| !(/private_stuff/ =~ l) } logger.info YAML::dump(bt) end
SELECT id FROM table_name WHERE (id = '2 asdfasdf 20');