similar to: Changing ActiveRecord serialize format to XML instead of YML

Displaying 20 results from an estimated 20000 matches similar to: "Changing ActiveRecord serialize format to XML instead of YML"

2006 Apr 20
5
Mystified by ActiveRecord.serialize
I''m either missing a step, confused or seeing some odd behavior with ActiveRecord''s serialize feature. When I load an ActiveRecord object from the database, my serialized attribute is a YAML::Object, not the original object. My code is based on an example of this capability in the "Agile Web Dev. w/ Rails" book (p. 196). In create.sql: <code> create table
2006 Jan 24
2
SwitchTower and multiple database.yml files - how do you deal with them?
Hi everyone, What are other people doing with regards to database.yml being in version control? My dilema: I set up my rails app in svn using these instructions: http://wiki.rubyonrails.com/rails/pages/HowtoUseRailsWithSubversion The part to note is where I ignore database.yml, allowing different developers to keep their own database.yml without clobbering other developers'' files.
2007 Nov 19
3
link_to and GET parameters
Hi, I am trying to generate a link to external site with GET parameters ( in new window). I tried following code, but it does not produce any parameters. <%=link_to "Open New Page", "https://www.foo.com/page/", {:popup => true}, {:param1 => "value1", :param2 => "value2"}%> and <%=link_to "Open New Page",
2011 Apr 21
0
how to serialize an xml node
I would like to transform an xml node into a RoR model but I don''t know how to start .. I started using Nokogiri ( easy for newbie to get simple needs ... but this one is more complex for my current level of understanding ... xml node : <localized> <locale> <code>en_GB</code> <title>Special
2006 Apr 26
3
problem with database.yml moving from 0.13.0 to 0.14.4
Hi, I''m upgrading from 0.13.0 to 0.14.4, and I''m having trouble with my database authentication. Even though the entries in my database.yml are correct, I get the following message when trying to do a ruby script/generate scaffold myClass... Access denied for user: ''@localhost to database '''' Why is the username and database name showing up as
2006 Sep 15
2
unable to figure out how to get backgroundrb.yml to be used when starting backgroundrb
i ran rake backgroundrb:setup and modified the default config/backgroundrb.yml file as: --- port: "22223" timer_sleep: 60 load_rails: true environment: production host: localhost database_yml: config/database.yml acl: deny: all allow: localhost 127.0.0.1 order: deny,allow and my database.yml production: adapter: mysql database: chip2_production username: xxxxx password:
2019 Jul 14
0
.travis.yml ... most likely included in error
Hi Spencer, To get rid of the .travis.yml note add a .Rbuildignore file with this line: ^\.travis\.yml$ This will exclude the file from the build. The build is failing because of a warning. As noted in the log, Travis is treating a warning as an error: Found warnings, treating as errors It's a bit hard to find the warning in the logs because of all the pdfTeX output but it's a warning
2006 Jul 21
3
Plain text passwords in database.yml
Hi All, It is our corporate security policy to not leave plain text passwords in text files (such as database.yml). I would like to to roll out a Rails application, but would like to find another way to connect to MySQL without leaving plain text passwords in database.yml Any thoughts? Thanks, Brian Long
2006 Oct 16
3
backgroundrb.yml not generated
I''m trying to do the tutorial at http://www.infoq.com/articles/BackgrounDRb. A little more than half-way through it says "Upon instalation, the plugin writes a config file into RAILS_ROOT/config/backgroundrb.yml." It didn''t happen for me. I installed the plugin with: ruby script\plugin install svn:\\rubyforge.org//var/svn/backgroundrb It added a bunch of files,
2008 Apr 02
1
Specifying environment in backgroundrb.yml
It seems that regardless of what environment I specify in my backgroundrb.yml file, it always uses development mode unless I pass "-e production" to the "script/backgroundrb start" command. >From looking at bdrb_config.rb, it looks like immediately after loading the config file it assigns whatever was passed on the command line (which defaults to development if nothing is
2010 Jan 30
1
RoR & YML
In ruby\lib\ruby\gems\1.8\gems\actionpack-2.3.5\lib\action_view\locale\en.yml I see activerecord: errors: template: header: one: "1 error prohibited this {{model}} from being saved" other: "{{count}} errors prohibited this {{model}} from being saved" # The variable :count is also available Where does "model" come
2006 Oct 18
0
database.yml, postgresql and pgpass.conf conflicts
Hi, I noticed that, on Windows at least, if I have a password set in the database.yml file for a database that I also have in my pgpass.conf file, the Rails adapter will die with a password authentication error. I don''t seem to have this issue on Unix systems. It''s simple enough to solve - just comment out the password info in the database.yml file. I just wondered if there
2011 Mar 09
1
ActiveRecord serialize method not returning YAML array in test environment.
Hello, I''ve got a problem with deserialization of AR "serialize" method (http://apidock.com/rails/ActiveRecord/Base/serialize/class) in my tests. It just gives me pure String instead of my data Array. Example: User > AR::Base serialize :roles, Array end Console: u = User.new u.roles = ["admin", "support"] u.save # => true User.first.roles # =>
2010 Dec 08
0
ActiveRecord serialize field and SerializationTypeMismatch
Hello. In one of my ActiveRecord models I specified a a serialize field: serialize :settings MyModelSettings If I understand the documentation correctly this restricts settings to the class MyModelSettings. The problem is that this is so restrictive that I even don''t know how to initialize the field. MyModel.new or even MyModel.new(:settings => MyModelSettings) everything I do
2006 May 10
2
Exploring ActiveRecord::Base#serialize
Hi I was recently taught about the useful ActiveRecord::Base#serialize. It''s very useful for persisting arbitrary objects through the regular database. For example, say you want to store a Set of all the years a Convention took place. You do: class Convention < ActiveRecord::Base serialize :years, Set end This effectively creates a Convention#years attribute, which is a set: you
2006 Apr 13
4
Apache/fastcgi setup can''t find custom config/*.yml file!
All, Apache 2/FastCGI on Linux My fastcgi config. file is set up to run the "test" RAILS_ENV. When I go to access a view associated with a particular controller, I keep getting a ENOENT (file not found) error on a custom config. file that I am attempting to load. What I can''t figure out is why it can''t find the file. Here''s the code that loads it in my
2008 Jan 08
5
Different environments in backgroudrb.yml
Hi, Got everything setup nicely with backgroundrb for the development environment and running tests with rspec. However, I have to keep editing the backgroundrb.yml file, to switch between development and testing environment. How can I declare a development, testing and production environment in backgroundrb.yml? Thanks in advance Rai
2006 Mar 05
1
encoding: utf8 in database.yml causes error
Hi Using ruby 1.8, rails 1.0, mysql 4.1.11 in database.yml: adapter: mysql encoding: utf8 database: myproject_development username: user password: password socket: /var/run/mysqld/mysqld.sock but when I start the error I get: Can''t initialize character set utf8 (path: /usr/share/libmysqlclient/charsets/) Can anyone tell me what file it''s looking for, and how I
2006 Jan 11
1
access value set in config/database.yml
Hi all I trying to access from my controller the host, database, user, password that being set in database.yml in the config directory. Anyone has any idea?
2006 Dec 24
1
How to get database.yml configuration to use it in a rake taks
Hello, I want to get the production environment configuration from the database.yml in the /shared folder of a deployed rails application. I could use scp to get the file, write it to temporary file, read it and open it with YAML, but is there a better way to do this? Best regards, -- AnĂ­bal Rojas http://www.rubycorner.com http://www.hasmanydevelopers.com