BSaboia has quit [Quit: This computer has gone to sleep]
berkhan has quit [Ping timeout: 264 seconds]
BSaboia has joined #ruby
BSaboia has quit [Quit: This computer has gone to sleep]
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
ox1eef_ is now known as ox1eef
eldritch_ has quit [Quit: bye]
eldritch_ has joined #ruby
<libsys>
hello people... I'm playing with Rack to build a minimal MVC application
Pixi has quit [Quit: Leaving]
<libsys>
I've been looking for ways to share the scope of the controller into the view, but haven't been able to find a way
<libsys>
of course if I execute the view within the controller that would work, but I'd like to do it by default without having to write it on the controller
prahal has joined #ruby
<prahal>
hi, is this a bug that "bundle install --local" without a Gemfile.lock bring in development gems dependencies even with "bundle config set --local without 'development test'" ?
<libsys>
maybe I could simply request to always execute a render function within the controller, still I'm curious
BSaboia has joined #ruby
BSaboia has quit [Client Quit]
<prahal>
github rubygems bundler repository is read only , should I still report issues to this repository ?
Pixi has joined #ruby
<prahal>
nvm I found it by cheer luck, rubygems/rubygems seems to now host bundler
prahal has quit [Quit: prahal]
BSaboia has joined #ruby
eldritch_ is now known as eldritch
lembron has joined #ruby
<lembron>
hi, using Sequel - table apps: primary :id, String :name -- first i do a semi-manual db.insert(:id=>1, name=>'mo')
<lembron>
then i start the manager, and "the first time it tries to insert a apps: line it fails as Key (id)=(1) already exists" -- clicking that very same button to create another in the UI again 'then works' tho
<lembron>
is there anything i have to "trigger" - i guess my "direct id write" skips the autoincrement-logic or such?
<adam12>
lembron: Database?
<adam12>
lembron: That should normally work fine. It sounds like a database issue.
<lembron>
postgres
<adam12>
lembron: What is the line that is causing the error? db.insert?
<adam12>
Oh. I actually misread this.
<adam12>
lembron: Do you know what version of postgres? This might be a postgres question and not a Sequel question. For newer versions of Postgres, they use a different type of identity column and I wonder if that's the issue.
<adam12>
lembron: Sometimes you can change the sequence, but I don't think you should mix and match. Either always provide the PK or let the db do it for you.
<lembron>
just Application.new() and then just a .save on this - Sequel model handels that all to what i understand...
<lembron>
"sequence" sounds about right, ive just found SELECT last_value FROM applications_id_seq; what prints "1"
<adam12>
You can restart it, but again, it's risky.
<adam12>
Something like `alter sequence applications_id_seq restart with 2` or something.
<adam12>
I'd definitely ask in the postgresql IRC channel.
<lembron>
hm.. appears as if 1 is correct anyhow...
<lembron>
booted, checked prints 1, tried creating (http-500), still prints 1, tried creating again now thi magically worked
<lembron>
hm and that "1" seems to be fully correct - when ry the table in empty state i still get "last_value=1, start_value=1 - only viible change is log_cnt jumps to 32 and is_called goes from f to t
<lembron>
oh and pg9.4 (in an attempt to run it with what the readme asked for)
random-jellyfish has joined #ruby
shokohsc867 has joined #ruby
shokohsc86 has quit [Ping timeout: 264 seconds]
shokohsc867 is now known as shokohsc86
_ht has quit [Remote host closed the connection]
<lembron>
managed to fix it by manually reforcing that seuence - creepy but k :P
<lembron>
now on how to make Sequel spit out a: SELECT setval('apps_id_seq', (SELECT MAX(id)+1 from apps), false);
<lembron>
little strange that a "SELECT * from apps_id_seq" showed the same number values before and after when it wasnt functioning, but well...
jpw has quit [Remote host closed the connection]
<lembron>
Gemfile, can i do something in the line of: gem 'something', ((ruby.version>=3)? '>=2' : '<=1')
<lembron>
:platforms seems to get close, but i want a version only, not a platform+version
nmollerup has quit [Quit: Leaving]
<weaksauce>
lembron install_if probably can do it
<lembron>
well not with the syntax i tried from the docs :/
<weaksauce>
install_if -> { RUBY_VERSION >= 3 } do gem "something", "2" end
<weaksauce>
or something like that
<lembron>
There was an error parsing `Gemfile`: comparison of String with 3 failed. Bundler cannot continue.
<weaksauce>
to_i
<weaksauce>
perhaps
<weaksauce>
actually that's not something that you can do
random-jellyfish has quit [Ping timeout: 256 seconds]
<lembron>
anbd last - the thing also does `Refrigerator.freeze_core(:except=>['BasicObject']) unless dev` - trying that with production blows up with a "`require': can't modify frozen #<Class:Object>: Object (FrozenError)" --- is it kinda safe to asume that the author never made it prod-able? or i that maybe to blame on ruby-version? (script originally for 1.9, running on 3.0 right now)
ur5us has joined #ruby
random-jellyfish has joined #ruby
ur5us has quit [Ping timeout: 245 seconds]
<weaksauce>
i don't think frozen objects have ever been just a warning
vit has quit [Ping timeout: 245 seconds]
<weaksauce>
so probably a buggy gem
<weaksauce>
yeah looking back at object for 1.9.1 object#freeze will raise an error