Displaying 20 results from an estimated 300 matches similar to: "IRB hex values"
2006 Jan 08
4
ID from child table not handled by AR
Hi all,
Im slowly moving forward, but there''s something a miss. I can save some
relational records to tables, but only once. For an unknown reason, the
primary key (id) of the child table is not automatically increased. (I can
only perform one save, (the first records id field holds the value ''0'') and
during the next save it says:
Mysql::Error: Duplicate entry
2006 Jan 09
2
catch id from form and copy between objects
Hi all,
Not completely sure what I''m doing, but I need to get data from another table
based on and id. Below is some breakpointer output:
irb> @params
=> {"project"=>{"project_description"=>"point2", "project_name"=>"break2"},
"action"=>"create_project",
2006 Jan 10
15
KISS and DRY? Not even close!
Hi all,
After working on my first rails app and having handed over some very
sophisticated coding from a lot of you guys. My app does what I want it to
do, but I''m no where near the end yet, and it seems that the KISS and DRY
objectives already went down the drain.
It could be lack of knowledge, only doing Ruby on (and) Rails for a month, but
I''m stuck on the following:
2006 Jan 10
8
Noob: Child records not saved
Hi all,
happily coding along, but it seems a belongs_to record is not saved.
# Create some stuff
def create_project
@contact = Contact.new
@project = Project.new(@params[''project''])
@project_contact = ProjectContact.new(@params[''collect''])
@project.project_contact = @project_contact
contact =
2006 Jan 03
0
data modelling
Hi all,
Building my hosting administration application, I wonder If somebody can give
me some feedback about the following.
When a customer wants a hosting package, I want to create a new project
(what''s in a name?). To which I copy contact info, (sub)products like
mailbox, hostname webspace. etc. And I want to log my hours into a project as
well.
I came up with the following
2006 Jan 05
7
HOWTO: Combine fields from 2 two tables in 1 object
Hi all,
For a dropdownlist (showing "Company - FirstName Lastname'') I want to fill an
object @project_contacts with "Name" from table Companies and "Firstname" and
"Lastname" from table contacts. Any idea?
Regards,
Gerard.
--
"Who cares if it doesn''t do anything? It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS
2006 Jul 03
0
Multiple File Upload
Hello together,
I developed a file upload in my application like this (files uploaded
belong to a project):
project_controller.rb:
----------------------
def upload_attachment
project = Project.find(@params[:id])
begin
project.attachments.create(params[:attachment])
rescue
flash[:attachment_error] = "Error at Upload"
end
redirect_to :action => "edit_project", :id
2006 Jun 13
0
script/console and IRB readline failure
Long input lines are confusing the readline on my script/console and irb sessions. I hit
back-arrow and suddenly the cursor goes up to the next line. Thereafter the previous-line
fails to work, giving me just an ampersand (&) instead of the previous line to re-edit.
WinXP SP2.
Warren Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 23
2
Using fixtures from IRB
Folks,
I have the standard setup with auto-generated unit tests and
fixtures. I edited the fixtures and the tests but would now like to
test associations from irb. How do I do this?
I''m not sure how to load my fixtures into irb, for example. Once they
are loaded I would create objects, save them to the db and pull
things out.
Thanks, Joel
--
http://wagerlabs.com/
2006 May 16
0
IRB -- Readline -- WinXP
I keep on running into an irb/readline bug in script/console or plain irb. If the line
lengths get to long then up-arrow won''t bring up the line properly. I guess that the
readline buffer is only so many characters long and I''m clobbering something. After it
gets clobbered then up-arrow only prints an ampersand.
W
-------------- next part --------------
An HTML attachment
2006 Mar 12
2
Find all the methods on a object in an irb session?
How can I find all the methods on an object from withing irb?
Thanks,
Joe
2006 Mar 27
0
RMagick + Cygwin = IRB Crash !!
Hi,
I am reinstalling rmagick on my pc and I am running into this issue:
in irb > require ''RMagick''. Boom irb crashes no messages, no stack.
I have installed GraphicMagick 1.1.7 and can run it from the command
line:
ie > inspect.exe xx.gif
I have installed rmagick.1.10.1 and it shows up in my gemlist and the
installed
looks successfull. Running the rmagic
2006 Mar 27
0
Crashing irb...
in irb > require ''RMagick''. Boom irb crashes no messages, no stack.
I have installed GraphicMagick 1.1.7 and can run it from the command
line: ie > inspect.exe xx.gif. I have installed rmagick.1.10.1 and it
shows up in my gemlist and the installed looks successfull. Running the
rmagic test I get the following error > ruby -v -x inspect.rb xx.gif
ruby: no Ruby script
2006 Feb 09
1
Irb Web Interface
I was wondering how to give the Ruby on Rails console a web interface
like this website http://tryruby.hobix.com/.
--
Posted via http://www.ruby-forum.com/.
2006 Feb 14
4
possible to reload a model in script/console(irb)?
I often use script/console to interact with models.
It would be nice if script/console acted like WEBrick when it comes to
reloading classes that get updated. Anyway to do this?
Short of this, is there a way to tell script/console to reload a class
manually? My current solution is to exit and restart script/console.
-Kelly
-------------- next part --------------
An HTML attachment was
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'',
2009 Aug 18
2
DBI: connect succeeds in IRB, fails in Rails
require ''dbi'' # 0.4.2
dbh = DBI.connect(''DBI:ODBC:PACS'', ''username'', ''password'')
This works in IRB; in Rails it fails (taken from Rails console):
DBI::InterfaceError: Unable to load driver ''ODBC'' (underlying error:
uninitialized constant DBI::DBD::ODBC)
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
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
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