Open AdamMarkowski opened 9 years ago
I've definitely seen this before, but right now I'm having trouble replicating it, and I can't remember for certain what the issue was.
Is that your full User model? Are there possibly any callbacks that make other database mods (like recording an audit log or similar)?
I've only ever encountered this issue, when attempting to save, update, etc. before a connection has been made to Cassandra. This only happened though when I attempted to use the gem outside of the normal Rails context (with aws-flow-ruby to be specific).
Hope this helps.
On Tuesday, 30 December 2014, Jason M. Kusar notifications@github.com wrote:
I've definitely seen this before, but right now I'm having trouble replicating it, and I can't remember for certain what the issue was.
Is that your full User model? Are there possibly any callbacks that make other database mods (like recording an audit log or similar)?
— Reply to this email directly or view it on GitHub https://github.com/jasonmk/datastax_rails/issues/33#issuecomment-68358734 .
Actually this is my entire User model, nothing more at the beginning of setting up the project and playing around. Could it be caused by the environment config? I'm starting cassandra in a search mode next to the rvm with ruby 2.1.5 and rails 4.2 on mac os yosemite.
This also occur when changed ruby to 2.0.0 and rails to 4.0.0
It seems that cql-rb works fine: ''' 2.1.5 :001 > client = Cql::Client.connect(hosts: ['localhost']) 2.1.5 :002 > client.use('activiter_development') => nil 2.1.5 :014 > client.execute("INSERT INTO users (id, bio, user_name) VALUES (uuid(), '2013-02-24T10:14:23+0000', 'Rang bell, ate food');") => #Cql::Client::VoidResult:0x007fc05b9a10f0 2.1.5 :015 > 2.1.5 :015 > client.execute("select * from users") => #<Cql::Client::QueryResult:0x007fc05b978e20 ................ '''
Ok, one of the guys finally reminded me where I saw that issue before, but I don't think it's going to apply here. It was if you tried to execute a CQL query while you were in a byebug session. Byebug seemed to be locking the thread up. I don't suppose there's any chance that's happening here is it? I tried replicating what you described above with several versions of Ruby and Rails and couldn't make it happen.
I had a similar problem (though with any query, including where queries). In my case the problem was Spring. Try it by starting rails without spring ('DISABLE_SPRING=true rails c').
Hi guys! I have trouble when trying to save object:
This is my User model:
I've set ione and datastax_rails to github repositories at Gemfile, but this didn't change anything at all.