Questions tagged [syck]

18 questions
16
votes
3 answers

why does psych yaml interpreter add line breaks around 80 characters?

Psych is the default yaml engine since ruby 1.9.3 Why, oh why does psych add a line break in its output? Check the example below. ruby -v # => ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-linux] require 'yaml' "this absolutely normal sentence…
mla
  • 215
  • 2
  • 5
12
votes
1 answer

Rails: syck has been removed, psych is used instead

I receive this message during capistrano deploy of my rails project: syck has been removed, psych is used instead Versions: gem 'rails', '=3.2.13' ruby 2.0.0p247 As i know ruby use native yamler "Psych". There is no any yamler in Gemfile. In my…
4
votes
2 answers

Why the difference in behavior of YAML parsers (syck and psych)?

Look at this case: ruby 1.9.2p0 (2010-08-18 revision 29036) [i686-linux] irb(main):006:0> YAML::ENGINE.yamler = "psych" => "psych" irb(main):007:0> '8902-20-13'.to_yaml ArgumentError: invalid date from /usr/local/lib/ruby/1.9.1/date.rb:1022:in…
3
votes
1 answer

How do I do YAML in JRuby in 1.9 with Syck?

If I run JRuby in Ruby 1.9 mode, and tell it to use Syck rather than Psych, nothing seems to work. Am I missing something? Andrew-Grimms-MacBook-Pro:~ agrimm$ ruby --version jruby 1.6.1 (ruby-1.8.7-p330) (2011-05-08 3fe11da) (Java HotSpot(TM) 64-Bit…
Andrew Grimm
  • 78,473
  • 57
  • 200
  • 338
3
votes
2 answers

ActiveRecords not serialized to yaml correctly

When I serialize active records I'm finding that the yaml format is different depending on which box I'm running on. On one box I get: object: !ruby/object:User instead of object: !ruby/ActiveRecord:User The first version is a problem because…
opsb
  • 29,325
  • 19
  • 89
  • 99
2
votes
2 answers

YAML.load never returns in Rails initializer

I'm trying to load a yaml config file during initialization of my Rails 3.1 app, and the call to YAML.load never returns. Here is my initializer file: STRIPE_CONFIG = begin config = YAML.load(Rails.root.join('config', 'stripe.yml')) || {} …
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
2
votes
2 answers

YAML, delayed_job : Psych vs Syck. How to make pysch read attr_accessors for a ruby object

I'm having problems using delayed_job (3.0.3) with ruby 1.9.3. Previously we were using ruby 1.8.7 which comes with yaml syck parser which read all the attributes that are set for a ruby object (including attr_accessors) but with the upgrade to…
Ari53nN3o
  • 1,202
  • 2
  • 14
  • 21
1
vote
0 answers

how to serialize an object using TCPServer inside?

In an effort to speed up frequently repeated runs of a particular script in my chain, I started serializing to disk custom objects that otherwise take too much time to create aggregately. Using built-in Yaml and/or Marshal. Yaml serializes fine to a…
Marcos
  • 4,796
  • 5
  • 40
  • 64
1
vote
1 answer

JRuby with YAML

When I use Rails with YAML I change boot.rb with require "yaml" YAML::ENGINE.yamler = "syck" It works fine with normal Ruby. When I transfer the application from Ruby to JRuby, it doesn't work. Where should I write these lines in JRuby?
jayesh
  • 2,422
  • 7
  • 44
  • 78
1
vote
1 answer

Syck.dump empty hash throws IO exception

I am busy writing a data migration which is going to allow us to change yamlers from Syck, to Psych. For this I need to migrate some columns in our data base. I have hit the following weird edge case (rdb:1) Syck.dump({}) *** NoMethodError…
Donovan Thomson
  • 2,375
  • 3
  • 17
  • 25
1
vote
0 answers

How to install syck 1.0.1 on Ubuntu 15.04?

I'm getting an error installing syck on Ubuntu 15.04. Building the native extensions fails: Installing syck 1.0.1 with native extensions Gem::Ext::BuildError: ERROR: Failed to build gem native extension. …
Machisuji
  • 738
  • 7
  • 16
1
vote
0 answers

Contact Detail syncing between people app and my app

I am involved in a project which has the functionality like whatsapp does for contacts.My app have to get the contact from phone(ie Peoples app) and sync it to server to find the users who are all already involved in my app.If a user not involved…
Ranjith
  • 309
  • 2
  • 13
1
vote
2 answers

YAML Encoding of Malformed String, Model Serialization Issues

I've isolated a problem with Ruby on Rails where a model with a serialized column is not properly loading data that has been saved to it. What goes in is a Hash, and what comes out is a YAML string that can't be parsed due to formatting issues. I'd…
tadman
  • 208,517
  • 23
  • 234
  • 262
1
vote
2 answers

TypeError reading in multiline regex

In a file is apparently stored a multiline regex, saved by YAML::dump(b1) without a problem. Question, how can I load it back when Syck seems to have issues with the multiline regular expression? b2 = YAML::load(File.open("browserObj.yaml",…
Marcos
  • 4,796
  • 5
  • 40
  • 64
0
votes
1 answer

"undefined method" error when running delayed_jobs in multiple queues with ./script/delayed_job -n

Having a problem with running delayed jobs in multiple queues. I had the same problem at the beginning when I ran all in one queue with rake jobs:work But solved it by running bundle exec rake jobs:work. Now for running different queues, I'm…
Moozly
  • 192
  • 1
  • 9
1
2