similar to: updating a column using irb,

Displaying 20 results from an estimated 100000 matches similar to: "updating a column using irb,"

2007 Nov 26
2
ruby-debug 0.9.3 and Rails 2rc1: falls directly to irb
Hi When starting my Rails 2rc1 app with "script/server --debugger", the console falls directly into irb once a "debugger" statement is encountered. Any idea what I have to do in order to be thrown into the debugger rather than irb? Many thanks, -sven -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message
2008 Oct 27
2
IRB error message (dyld: NSLinkModule() error)
Hi folks, I''m new to Rails. I picked up Simply Rails 2 by Patrick Lenz a few weeks ago and I finally sat down to get stuck into it. I have Rails installed on my iMac (OS X Leopard) and I can load up the Rails Welcome screen at localhost:3000 without any issues. My problem is with running IRB within Terminal. If I try to run: irb> 1 I receive the error: dyld: NSLinkModule() error
2007 Jan 23
0
Inconsistency of data in controller and irb
I have a find query in a controller like this def loadtags(product) @tags = Tagging.find_all_by_taggable_type_and_taggable_id(0,product.id) puts product.id puts @tags.collect{|x| x.id} @tags.collect!{|x| x.id}.collect!{|x| Tag.find(x)} puts @tags.collect{|x| x.name} puts ''----------------------------'' @tags end and I test with the same parameters in irb but
2008 Oct 10
2
Add hash to serialized column
Hey guys, I''m trying to merge a hash with another using the .merge! function. class User < ActiveRecord::Base serialize :preferences end This is what I end up with in the console: >> u = User.find(1) >> u.preferences.merge!{:test => 1} SyntaxError: compile error (irb):32: syntax error, unexpected tASSOC, expecting ''}'' u.preferences.merge!{:test
2008 Jan 18
2
NameError when using alias_method -- but method exists?
Hello Rubyists, I am a bit stumped here. I want to extend the ''load_file'' method in the YAML module. Following along with the PickAxe example of making old methods do new things, I try this in irb: >> module YAML >> alias_method :orig_load_f, :load_file >> def load_file(*args) >> contents = orig_load_f(*args) >>
2007 Apr 23
3
Troubles with using gems in Rails
Hi! I''m observing some problems using gem inside Rails. My understanding is that after following sequence in irb: $ irb irb(main):001:0> require ''rubygems'' => true irb(main):002:0> require ''active_record'' => true irb(main):003:0> gem ''acts_as_taggable'' => true I should have access to acts_as_tagable mixins, like:
2008 Jul 08
0
Bug with serialized columns in console ?
Hi, I recently added 2 serialized columns in my class Server : class Server < ActiveRecord::Base serialize :visa, Hash serialize :appli, Array ... No problem in my controller and my application and everything works as expected : Excel exports following the "visa" Hash or "appli" Array are ok. But since I added the visa Hash, I can''t load the record with
2013 Jun 21
7
IRB help
I''m new to Ruby. I installed Rails on Windows 8. When I type mkdir in IRB, I''m getting this. I tried running the IRB as administrator too, and still get the same result irb(main):001:0> mkdir lesson2 NameError: undefined local variable or method `lesson2'' for main:Object from (irb):1 from C:/RailsInstaller/Ruby1.9.3/bin/irb:12:in
2007 May 10
1
errors using ruby script/console
HI all, when i try to use the rails console with this command, ruby script/console, i got the following errors: /usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require'': no such file to load -- readline (LoadError) from /usr/local/lib/ruby/1.8/irb/completion.rb:10 from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'' from
2010 Aug 27
0
Syntax highlighting in IRB || Script/Console
Railers, I would like to know if there is a way of changing colors for IRB standard input ($stdin). What I am interested in "is having IRB highlighting syntax as I type". Among other stuff, I would like to be able to: - set its background colours - have differing colours for strings, variables, keywords, e.t.c. I do use Wirble and Term-ansicolor gems, and they are fine when it
2008 Jun 06
1
Need help with Decryption using blowfish CBC
Hello all, Hoping someone can help me out here. I''ve burned almost a week trying to figure out how to decrypt an image file that has been encrypted using Blowfish CBC. I found some code on the net and have modified as follows: require ''openssl'' require ''digest/sha1'' ivArr = [0x0D, 0x0E, 0x0A, 0x0D, 0x0F, 0x0A, 0x0C, 0x0E ]
2007 Mar 09
3
NetBeans 6.0/Script Console Window
Has anyone figured out how to turn NetBeans IRB window into Ruby on Rails script/console window where the gems like ActiveRecord, ActionPack etc are recognized? May be an easy one for the Rails Guru''s out there, not for me. By default, the NetBeans IRB window only loads Ruby. I am trying to see how well NetBeans 6.0''s Ruby/RoR support works fully realizing that it is an alpha
2012 Mar 05
0
Rails 3 - How can you get access to current_user in the IRB console?
I''m doing some design/debugging in IRB and need to login a user and then be able to gain access to current_user in my efforts (I''m using Devise for authentication.) I found a sequence from SO that allows me to successfully login via IRB and access a page response: >> ApplicationController.allow_forgery_protection = false >> app.post(''/sign_in'',
2010 Oct 07
3
IRB problem (rb1.9.1 +rails3.0 )
first post in this forum... I have ubuntu 10.04Lts / rb1.9.1+ rails 3.0... when I am trying to use irb... ($rails console) I get this... I have tried to reinstall everything(irb ruby readline by synaptic) but nothing came up any help would be nice ! thanks in advance... ! mihaill@mihaill-laptop:~/www/blog$ rails console /usr/local/lib/ruby/1.9.1/irb/completion.rb:9:in `require'': no such
2007 Aug 09
0
TypeError: $_ value need to be String (nil given)
Hello all, I am trying to run a unit test in a Rails project of mine (Rails 1.2.2, Ruby 1.8.4 (2005-12-24) [i486-linux]), and am running into the following error: 1) Error: test_pattern_splits(PatternSplitTest): TypeError: $_ value need to be String (nil given) /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ validations.rb:74:in `split''
2009 Apr 15
2
Backspace in strings and patterns
Interesting. Not what I expected. This is Ruby 1.8.6. > irb irb(main):001:0> str = "abx\bc" => "abx\bc" irb(main):002:0> str.length => 5 irb(main):003:0> s = str.sub(/.\b/, '''') => "ab\bc" irb(main):004:0> s.length => 4 irb(main):005:0> s = str.sub(/.\x08/, '''') => "abc"
2007 Jul 23
1
readline (LoadError)
hi, i''m a noob in ror, today i bought a book to learn ror. i do everthing that stand''s in this book, and the shit does''t work! i use Aptana IDE with RadRails the problem is: Loading development environment. /usr/lib/ruby/1.8/irb/completion.rb:10:in `require'': No such file to load -- readline (LoadError) from /usr/lib/ruby/1.8/irb/completion.rb:10 from
2007 Dec 21
3
Access url_for from rake task
How do I access ActionController:Base url_for method from a Rake task. I tried to access ActionController from irb but it doesn''t work? Check out the pasite http://pastie.caboo.se/131266 -- Anil http://anilwadghule.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To
2006 Oct 20
2
Calling a method in a gsub?
Ok, so I would like to do something like this: string.gsub(regexp, output(''\0'' ,''\1'', ''\2'') Output returns a string. I tested it in irb and it worked ok. Now when it''s in my application, the ''\1'' and others don''t resolve as backreferences to the matches as they should. How can I fix this? Or go around
2007 Dec 29
2
Sending methods after classifying
The following code gives me an error: class_vars = [''fruit'',''cow'',''coffee''].each do |class_var| "#{class_var}".classify.send(:find, 1 + rand(10)) end The error message stack: LocalJumpError: no block given from (irb):34:in `find'' from (irb):33:in `each'' from (irb):33:in `find''