<markcl>
I have data that won't fit on a text ActiveRecord field
<markcl>
Is there a field type I can use that's bigger than the text field?
tkuchiki has joined #ruby-lang
jxpx777_ has joined #ruby-lang
jxpx777_ has quit [Read error: Connection reset by peer]
jxpx777 has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 260 seconds]
<mark06>
|jemc|: hi, you there
stardiviner has joined #ruby-lang
haraoka has joined #ruby-lang
sepp2k1 has joined #ruby-lang
sepp2k has quit [Ping timeout: 258 seconds]
<womble>
markcl: You're storing more than 4 GB of data in a database field?
stardiviner has quit [Client Quit]
RobertBirnie has quit [Ping timeout: 272 seconds]
<wallerdev>
lol
<wallerdev>
i think TEXT defaults to like 64kb
fragamus has quit [Quit: Computer has gone to sleep.]
TheToad has quit [Read error: Connection reset by peer]
<wallerdev>
maybe you want MEDIUMTEXT or LONGTEXT
elico has quit [Quit: Leaving.]
<wallerdev>
or use the file system
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bantic has joined #ruby-lang
|jemc| has joined #ruby-lang
igaiga has joined #ruby-lang
yfeldblu_ has joined #ruby-lang
yfeldbl__ has joined #ruby-lang
skammer3 has joined #ruby-lang
hahuang65 has quit [Ping timeout: 244 seconds]
cirenyc has joined #ruby-lang
imkmf has quit [Ping timeout: 240 seconds]
imkmf_ has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
sush24 has joined #ruby-lang
fragamus has joined #ruby-lang
yfeldblu_ has quit [Ping timeout: 272 seconds]
yfeldbl__ has quit [Remote host closed the connection]
skammer3 has quit [Ping timeout: 244 seconds]
yfeldblum has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
yatish27_ has joined #ruby-lang
yfeldblum has joined #ruby-lang
yatish27 has quit [Ping timeout: 245 seconds]
yatish27_ has quit [Remote host closed the connection]
banister has joined #ruby-lang
yatish27 has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
yatish27_ has joined #ruby-lang
<markcl>
wallerdev: i have no idea why it would be <64Kb
<markcl>
it doesnt look > 64Kb at all
<wallerdev>
did you miss a word there?
<wallerdev>
because you just said something then refuted it
TheToad has joined #ruby-lang
<markcl>
*<64Kb => >64kb
<markcl>
sorry
<markcl>
lol
<markcl>
multitasking
<markcl>
abstract_mysql_adapter.rb:285:in `query': Mysql2::Error: Data too long for column 'credits' at row 1
yatish27 has quit [Ping timeout: 255 seconds]
igaiga has quit [Ping timeout: 255 seconds]
<womble>
markcl: So what's the definition of 'credits', and what are you putting in there?
<womble>
(Also, when did MySQL start *reporting* problems with data, rather than silently truncating/mangling it to fit?)
paul_k has joined #ruby-lang
<markcl>
Im putting a json of credits
<markcl>
like directors and producers and camera men and stuff
<markcl>
I don't know
<markcl>
I'm using Ruby ActiveRecord library
<markcl>
with the MySql2 adapter
paul_k has left #ruby-lang [#ruby-lang]
<markcl>
credits
<markcl>
is defined as
<markcl>
t.text :credits,
mistym has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
<markcl>
It is just so weird
<markcl>
Yesterday
<markcl>
I had to change from InnoDB to MyISAM because my queries become greater than 8KB
<markcl>
which InnoDB couldn't handle
<markcl>
for some reason
rcvalle has joined #ruby-lang
<markcl>
Never encountered something like that yet before, granted I never needed to put a huge credit list on a MySQL db
yugui_zzz is now known as yugui
Miphix has quit [Ping timeout: 272 seconds]
<womble>
markcl: What does the *DB* say the column is defined as?
tkuchiki has joined #ruby-lang
mannyt has quit [Quit: Connection closed for inactivity]
<soahccc>
markcl: that sounds weird, have you tuned the mysql innodb settings? We had to increase text to largetext for some data and we had no problems with query sizes
* womble
is betting it's index sizes, not query sizes
<markcl>
womble: TEXT
<markcl>
I made it into LARGETEXT now
<markcl>
Im crossing my fingers as I begin the sync
<markcl>
The sync takes data from txt files the movie makers created
<markcl>
which includes credits where everyone involved in the movie is listed
<womble>
Ah, no, this will be it: "Although InnoDB supports row sizes larger than 65,535 bytes internally, MySQL itself imposes a row-size limit of 65,535 for the combined size of all columns"
<markcl>
my ruby script converts this credits to a json format, that categorizes people by their tasks, i.e. lighting, photography, actors, etc
<markcl>
That's really unfortunate
<womble>
Oh, and this: "Every table (regardless of storage engine) has a maximum row size of 65,535 bytes. Storage engines may place additional constraints on this limit, reducing the effective maximum row size."
stardiviner has joined #ruby-lang
* womble
adds that to the list of reasons why he's happy he uses PgSQL
JoshuaPaling has joined #ruby-lang
* soahccc
had gigabytes as BLOB in one row... don't know what you are talking about
<markcl>
womble wow
<womble>
soahccc: I'm reading the documentation. Reality is irrelevant.
<womble>
Perhaps some column types get moved out
<womble>
The docs specifically talk about big VARCHAR columns causing table creation to fail
* womble
doesn't care enough to test this out
j4cknewt has joined #ruby-lang
mistym has joined #ruby-lang
TheToad has quit [Read error: Connection reset by peer]
<mark06>
yeah, converting two lines of code to what you want is hard
<womble>
He's too busy lecturing you on idiomatic Ruby.
kgrz has joined #ruby-lang
TheToad has joined #ruby-lang
<rkowalick>
wtf
<rkowalick>
at that issue
<rkowalick>
The whole point of Ruby is that you don't have to write idiomatic Ruby
<rkowalick>
Well
<rkowalick>
I guess
<rkowalick>
that is not _the_ point
symm- has quit [Ping timeout: 272 seconds]
<rkowalick>
Using $0 in a library designed to write command line program is pretty damn reasonable
michd has quit [Ping timeout: 250 seconds]
RobertBirnie has joined #ruby-lang
michd has joined #ruby-lang
Lewix has quit [Read error: Connection reset by peer]
Lewix has joined #ruby-lang
imkmf has joined #ruby-lang
JoshuaPaling has joined #ruby-lang
<|jemc|>
mark06: honestly, the use of $options and $arguments is enough to keep me from wanting to use your library
<|jemc|>
but I respect your right to implement your own library however you choose
<|jemc|>
although, if you're interested, the easiest way to have them remain effectively global without being $globals is to make them class methods of a constant
<|jemc|>
like EasyOptions.arguments and EasyOptions.options
haraoka has joined #ruby-lang
<mark06>
idiomatic?
<rkowalick>
"A style which will prevent people from judging you harshly in this channel"
<|jemc|>
mark06: well I would say it's more idiomatic for ruby to do it that way, but because you have a sister library in bash it is certainly more _consistent_ to use $globals
<|jemc|>
again, don't let me stop you from doing something your way
<mark06>
|jemc|: hi, I'm open to improve code, I just don't understand why could he do what you did now, provide concrete alternative to two simple lines of code... I guess I know why
<mark06>
*couldn't
womble has quit [Excess Flood]
<mark06>
|jemc|: about your suggestion, can't it be class variables?
womble has joined #ruby-lang
Lewix has quit [Remote host closed the connection]
<rkowalick>
Class variables are somewhat confusing in Ruby
<|jemc|>
if they were @@cvars within EasyOptions, they would only be accessible in EasyOptions or in other classes in the same inheritance chain
<rkowalick>
For someone new to Ruby, there is a lot going on there
<|jemc|>
mark06: why do you want it to be a @@class_variable ?
<|jemc|>
mark06: often what you really want is an @instance_variable of the class
<mark06>
|jemc|: because it's data generated in the require, not in the method call, so it's more why make them into methods if these methods don't do anything but return an existing data
<rkowalick>
mark06: You've hit upon a fundamental concept in OO programing
<mark06>
rkowalick: develop please
<|jemc|>
mark06: typically, a well-behaved gem will only have global effects that are nested within its own namespace, a constant corresponding to the name of the gem
<|jemc|>
there are gems that break this rule, but developers like me avoid them
<|jemc|>
so if I have a gem 'my_gem', all of my stuff should get namespaced into the constant MyGem, to the extent that this is practical
TheToad has quit [Read error: Connection reset by peer]
<rkowalick>
mark06: hiding data in methods allows you to change the way the data is gathered without affecting how to the data is obtained
<mark06>
|jemc|: ok but how about my last line to you
<|jemc|>
it reduces the chances of namespace collisions when someone is combining gems whose authors didn't necessarily plan to for them to be used together
<|jemc|>
mark06: I myself hate prescriptivism and imposed rules, but voluntarily following a kind of social contract will help your code play well with others' code
<mark06>
rkowalick: but can a method be used in exactly all the same syntaxes that a variable can? for example, we could do EasyOptions.arguments[0] but is there something we can't?
<|jemc|>
if you choose to opt out of the social contract, that's absolutely okay, but others may avoid your code because of it
<rkowalick>
mark06: If EasyOptions.arguments return an array, you certainly can do that
<mark06>
|jemc|: ok but I don't understand why methods rather than variables, considering what I said about the methods not really executing any code
<mark06>
|jemc|: ok I realize attr accessors are methods
<|jemc|>
mark06: well, using a method is the only way for one object to access another object's variables
<mark06>
|jemc|: you mean just attr accessors like in your example, right?
<mark06>
rkowalick: array was merely an example
<|jemc|>
well, attr_accessor :foo is a 'shortcut' for defining two methods: 'foo' and 'foo='
<rkowalick>
mark06: I guess I would be interested in more examples you have about ways you would want to use the code
<|jemc|>
with 'foo' getting the '@foo' variable internally anf 'foo=' setting the '@foo' variable internally
<mark06>
rkowalick: I don't understand you
<mark06>
rkowalick: suppose we could not do method_that_returns_an_array[index]
<rkowalick>
mark06: You said you wanted to know ways in which the method would be inferior to using variables
<mark06>
rkowalick: then that would be a difference between implementing $options and $arguments as arrays or module/class variables
<rkowalick>
mark06: I'm just curious what you are thinking of
<rkowalick>
Basically everything |jemc| said
<rkowalick>
But there are other non-social-contract reasons
<mark06>
rkowalick: suppose that code could not exist please
<rkowalick>
mark06: Okay
<mark06>
rkowalick: then that would require you to first x = method
<mark06>
and only then access x[1]
<mark06>
rkowalick: thus, that would be a reason I would not like to implement it as a method
<rkowalick>
I honestly have no idea
<rkowalick>
what do you want to do with a variable that you can't do with a method call
<|jemc|>
mark06: methods can be chained freely in ruby without assigning them to a local first
<mark06>
rkowalick: I'm asking if there are *any* *other* syntax that we can't do with methods, only with variables (supposing we couldn't do the array access, which is just one example I could think of)
<rkowalick>
I have trouble thinking of anything
<mark06>
rkowalick: ok, sounds reasonable
yfeldblum has joined #ruby-lang
<mark06>
rkowalick: I wrote easyoptions because I was sick with all the stupid option parsing code, so I want to avoid making it anything different than a one-liner
<mark06>
so I want to keep:
<mark06>
1. how can I parse the options? just require the script
<mark06>
2. how do I access the option? just do <this> (one single statement)
<mark06>
3. (the same as above for regular arguments)
igaiga has joined #ruby-lang
diegovio1 has joined #ruby-lang
diegoviola is now known as Guest29481
<mark06>
so no stuff like EasyOptions::IsThisEasy==>{:parse => 'non/sense'}; please::LET:me>please << please.read (:a, :***king |command| line.option? )
diegovio1 is now known as diegoviola
skammer3 has joined #ruby-lang
kgrz has quit []
Guest29481 has quit [Ping timeout: 260 seconds]
TheToad has joined #ruby-lang
<womble>
That'd probably be valid syntax in Perl...
Lewix has joined #ruby-lang
<mark06>
hahaha
skammer3 has quit [Ping timeout: 245 seconds]
<rkowalick>
EasyOptions.arguments[2] is not okay?
kgrz has joined #ruby-lang
<rkowalick>
or EasyOptions.options[:help]
<mark06>
rkowalick: sounds reasonable now, but I'm still tempted to try removing the "EasyOptions." part somehow :)
haraoka_ has joined #ruby-lang
<rkowalick>
Easy.arguments[2]
<rkowalick>
Easy.options[:help]
haraoka has quit [Ping timeout: 255 seconds]
<mark06>
how about Options[:name] and Arguments[0]?
<rkowalick>
Well
<rkowalick>
This goes back into what |jemc| was saying
<rkowalick>
Options and Argument are common domain objects in programming
<rkowalick>
using classes with such a generic name could cause a name collision
<mark06>
domain objects?
<mark06>
ah ok
<rkowalick>
'terms that a programmer would use'
<rkowalick>
Making a class like RollerCoasterAwarenessMonitor is better than Monitor
<mark06>
I don't understand your -2nd line
<mark06>
well, Easy is too common too
<rkowalick>
I was just saying what I meant by common domain objects in programming could be rephrased as common terms in programming
<rkowalick>
The relavent question is: does RubyGems.org have an Easy gem
stevenkuhn has quit [Quit: stevenkuhn]
<|jemc|>
geez, just use your damn $globals and be done with it
<mark06>
does it have an Option gem
stevenkuhn has joined #ruby-lang
<rkowalick>
I think the Standard Library might use that name
<rkowalick>
lol
<mark06>
how about EasyOptions[:name] and EasyOptions.arguments[1]
<rkowalick>
haha
<rkowalick>
EasyOptions[:name] is definitely something that is tricky to do
<|jemc|>
no, it's not
<rkowalick>
oh
<rkowalick>
I guess
<rkowalick>
self.[](arg)
<rkowalick>
in the class would do it
<rkowalick>
of course
<rkowalick>
you are right
<|jemc|>
>> module EasyOptions; def self.[](key); @options[key]; end; end
TheToad has quit [Read error: Connection reset by peer]
bantic has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
fragamus has joined #ruby-lang
tylersmith has joined #ruby-lang
snsei has quit [Remote host closed the connection]
bruno- has joined #ruby-lang
bruno- has quit [Client Quit]
snsei has joined #ruby-lang
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
snsei has quit [Read error: Connection reset by peer]
snsei has joined #ruby-lang
bruno- has joined #ruby-lang
jxie has quit [Ping timeout: 240 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lewix has joined #ruby-lang
snsei has quit [Remote host closed the connection]
RobertBirnie has joined #ruby-lang
snsei_ has joined #ruby-lang
TheToad has joined #ruby-lang
tenderlove has joined #ruby-lang
ruby-lang066 has joined #ruby-lang
j4cknewt has quit [Remote host closed the connection]
ruby-lang054 has joined #ruby-lang
snsei_ has quit [Ping timeout: 272 seconds]
mikecmpbll has joined #ruby-lang
Sirupsen has joined #ruby-lang
tenderlove has quit [Ping timeout: 260 seconds]
bruno- has quit [Ping timeout: 260 seconds]
<ruby-lang054>
I am deploying my rails app with capistrano 3.2.1 on a vps, i could sucessfully run "cap production deploy:setup_config" but when i run "cap production deploy" i get "LoadError: cannot load such file -- nokogiri" after assets:precompile.
<ruby-lang054>
I am using rvm for managing ruby versions
<wallerdev>
maybe try installing nokogiri
<ruby-lang054>
i am getting the error in shared/bundle/1.9.1
<ruby-lang054>
but i am using ruby 1.9.3
<ruby-lang054>
gem install nokogiri does no get installed in shred/bundle/1.9.1/gems
<jhass>
ruby-lang054: the 1.9.1 is the ABI version of the 1.9 series, so of the interpreter version 1.9.3 too
yxhuvud has quit [Remote host closed the connection]
yxhuvud has joined #ruby-lang
<ruby-lang054>
.rvm/bin/rvm 1.9.3@gemset do bundle exec rake assets:precompile this is giving me the error
<jhass>
try ... do bundle install first
yfeldblum has quit [Ping timeout: 260 seconds]
loincloth has joined #ruby-lang
<ruby-lang054>
bundle install works fine
ikrima has joined #ruby-lang
ruby-lang054 has quit [Ping timeout: 246 seconds]
yatish27 has joined #ruby-lang
ecnalyr has joined #ruby-lang
j4cknewt has joined #ruby-lang
ruby-lang066 has quit [Ping timeout: 246 seconds]
havenwood has joined #ruby-lang
ecnalyr has quit [Ping timeout: 244 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
michaeldeol has joined #ruby-lang
TheToad has quit [Read error: Connection reset by peer]
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
gjaldon has quit []
DEac- has quit [Read error: Connection reset by peer]
DEac- has joined #ruby-lang
elia has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
TheToad has quit [Read error: Connection reset by peer]
banister has joined #ruby-lang
banister has quit [Max SendQ exceeded]
banister has joined #ruby-lang
stamina has joined #ruby-lang
fragamus has quit [Quit: Computer has gone to sleep.]
Squarepy has joined #ruby-lang
fragamus has joined #ruby-lang
banister_ has joined #ruby-lang
banister has quit [Read error: Connection reset by peer]
klmlfl has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby-lang
momomomomo has quit [Ping timeout: 260 seconds]
klmlfl has quit [Read error: Connection reset by peer]
klmlfl has joined #ruby-lang
bsvineet_ has quit [Remote host closed the connection]
bsvineeth has joined #ruby-lang
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stevenkuhn has quit [Quit: stevenkuhn]
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheToad has joined #ruby-lang
bsvineeth has quit [Ping timeout: 258 seconds]
SuMo_D has joined #ruby-lang
klmlfl has quit [Read error: Connection reset by peer]
skade has quit [Quit: Computer has gone to sleep.]
klmlfl has joined #ruby-lang
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Remote host closed the connection]
fragamus has quit [Quit: Computer has gone to sleep.]
skade has joined #ruby-lang
havenwood has joined #ruby-lang
<karamazov>
Quick question about ActiveSupport::Concern - If I don't specify an `included` definition it'll just default to all the methods in the sub module ClassMethods?
havenwood has quit [Remote host closed the connection]
sharpmachine has quit [Remote host closed the connection]
stevenkuhn has joined #ruby-lang
havenwood has joined #ruby-lang
wallerdev has joined #ruby-lang
RobertBirnie has joined #ruby-lang
<centrx>
karamazov, yes
<karamazov>
centrx: Thanks - I'm having a tad bit of difficulty wrapping my head around it and struggled to find understandable documentation