similar to: random exception driving me crazy: SecurityError (Insecure: can't modify array)

Displaying 20 results from an estimated 500 matches similar to: "random exception driving me crazy: SecurityError (Insecure: can't modify array)"

2008 Aug 25
1
acts_as_state_machine: SecurityError calling insecure method
(also posted on rails forum: http://railsforum.com/viewtopic.php?id=21744, then I discovered this lilst and there are many more people...) Hi, since yesterday I suddenly recieve lots of such messages in my logfiles - and everything in the user model that uses that plugin fails! My deployed Rails code hasn''t changeed in 5 days, and those errors started to appear only a day ago.
2009 May 19
1
logging with the daemons gem
I am trying to leverage the daemons gem but I am confused about the proper way to set up logging. I am able pass options which configure stdout to go to a log file but it seems like all calls to Rails.logger are disabled as I see the following message in my output: usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/buffered_logger.rb:99:in `write'': closed
2008 Jan 07
2
acts_as_state_machine override :initial state
Hello, I''m not sure if this is where to post this, but i cannot find much information/support for acts_as_state_machine. I have a Friendship model which implements acts_as_state_machine. I have an :initial state of :pending, but i would like to create a Friendship model and save it directly with :accepted status. I have tried Friendship.create(:state => "accepted") and
2006 Jul 13
2
having a problem with acts_as_state_machine
Hi all: Below is s a dump from script/console in development env. Am I not supposed to be able to find the record later and use the state machine functionality, or have I missed something? Thanks Forrest ---------------------------- >> ts2 = TalkSession.create( :person_id => 2, :pattern_id => 2) => #<TalkSession:0x35811f0 @attributes={"pattern_id"=>2,
2008 Jan 23
1
acts_as_state_machine doesn't error on invalid state transition?
While using acts_as_state_machine, I noticed it doesn''t error when invalid state transition is used. No false return, no exception. By invalid state transition, I mean utilizing an event that does not define the current state as a ''from'' state. Does anyone find this lacking? I would like to be able to catch invalid state transition (such as attempting to fulfill a
2006 Mar 16
4
Handling/Catching Exceptions
Hello! I was wondering, sometimes I raise an exception in my Rails apps, e.g.: raise SecurityError unless @post.user == logged_in_user Now: is there any way to catch that SecurityError exception somewhere and render a custom template? E.g., I want to render ''app/views/content/security_error.rhtml'' Does anyone know how to do this? Thanks a bunch, Rob
2007 Dec 31
1
Store limited list in db?
Hello, I''m currently developing an application which contains a Movie object. I was wondering what the best way to store a limited list such as mpaa_rating would be? The list is not likely to expand often, so i was wondering if it was still best to store this list in a table? Or if there was something else like acts_as_state_machine for maintaining a simple list like this. thanks!
2008 Feb 11
6
Should I Test My Fixtures?
I have a number of fixtures in my test suite. For example, with acts_as_authenticated and acts_as_state_machine, I created a number of users in different account states for use in functional testing. (Suspended users can not log in, etc) Is it a good idea to run fixtures through tests to ensure that they conform to their ideals? EG: assert users(:suspended_user).suspended? If so, where should
2007 Mar 27
3
Stubbing out method for all instances
I am using the acts_as_state_machine plugin to control state of an object in my app, however when testing this I need to be able to stub out the guard conditions so that state will change when I fire off an event without depending on other models. Guard conditions simply return true or false so I have an instance method: def encoded? <check state of other objects> return true
2016 Feb 18
2
Asterisk 13 and WebRTC. Is wiki page still valid ?
Hello, I'm trying to have my first calls with WebRTC. My server has asterisk 13.7.0. I'm following the instructions from the wiki [1]. So I'm using [2] live demo from a Chrome navigator (v48) on Debian Jessie station. Whenever I type something like ws://123.123.123.123:8088/ws in Expert Mode form (see [1]), I'm getting this error : *2:SecurityError: Failed to construct
2007 Jan 24
2
hello! first post + context_setup
Greetings all. I''m looking over a ''greenfield'' pasture, and enjoying the TDD(BDD) process of creation. I''m currently rspec''ing a finite state machine (acts_as_state_machine). As such, I need to persist the model through ''specifies'' within the context - from top to bottom. I have bumped into a couple of probs: 1. context_setup
2008 Mar 18
1
Polling is REALLY slow
I''m having some trouble with using brb for polling for work. Basically, what I want to do is update the state of a record and have brb notice and start a process. I do not want to call ask_work for each process because there may be several places where the object''s state is changed, and I only want to process once. Plus, I can schedule things better this way. My first thought
2007 Oct 13
4
Chapter 9
Hello, I''m currently stunk on this issue for few days and I do not know how to get it fixed. The system always raises this error message : order is closed and here is my order.rb: class Order < ActiveRecord::Base include ActiveMerchant::Billing before_validation :set_status attr_protected :id, :customer_ip, :status, :error_message, :updated_at, :created_at attr_accessor
2008 Oct 28
7
aasm callback order?
Hello! Sometime ago I ran across a webpage where someone had identified the full callback sequence for an object lifecycle including AASM with it''s :enter and :exit and whatnot callbacks. Unfortunately, I can''t find it and searches don''t seem to help. Does anyone have a reference to a page that shows the callback sequence with Acts As State Machine (the gem)? I think
2006 Apr 16
2
Making requests in order
Hello all, This is an interesting problem I have been working on. What I have is a little multiuser project request tracking application. What happens is that I log in and create projects and assign people to the projects. Each project has steps associated with it, and the steps need to be done in a certain order. Now, I have to request that the assigned person perform each of the steps, and
2008 Jun 12
2
SslRequirement Problem
Hello everyone, I''m pretty new to the RoR''s thing and am having a problem setting up SslRequirement plugin. I have installed the SslRequirement plugin and added it to my application_controller.rb with include SslRequirement However, when I try and do "ssl_required :process_payment" I get the following error: undefined method `ssl_required'' for
2009 Jun 04
0
Error with Rails.logger: closed stream (IOError)
Hi all. I am creating a plugin that uses the daemons gem to run some code in the background. In that code, I call Rails.logger.info "message", but receive the following error. /opt/local/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/buffered_logger.rb:99:in `write'': closed stream (IOError) Anyone seen this before and have any idea what''s going on?
2012 Oct 05
1
Is Rails Logger Thread Safe?
Is Rails Logger truly not Thread Safe? http://log.kares.org/2011/04/railslogger-is-not-threadsafe.html This seems like an issue that should have been picked up quite a long time ago. I just set config.threadsafe! in my config/application.rb and my log output from rails server has completely disappeared. If the logger is not thread-safe, I cannot help but wonder how much of the Rails core is
2008 Sep 08
2
Restful Authentication and State Machine state transfer question
I''m adding some code to a project using restful_authentication and acts_as_statemachine In the create method for a user there is the following code generated by the restful_authentication template @user.regster! if user.valid? And this will save and the user record if it is valid. I understand that the statemachine will then change the state from passive to pending. It will guard
2009 Oct 28
1
Using Cucumber with Lockdown
Has anyone had any issues using Cucumber with Lockdown. in the following scenario, I am logged in as an admin and so should have :all access rights, however I get the following error. Authoriztion filed! prms: {"action"=>"index", "controller"=>"admin"} session: {:expiry_time=>Wed Oct 28 13:33:43 +0000 2009,