similar to: RegExp does not match

Displaying 20 results from an estimated 300 matches similar to: "RegExp does not match"

2012 Nov 08
1
validates_uniqueness_of(*attr_names) w scope not working in unit test
Rails 3.2.8 Very strange , it works in dv mode console , but not in a unit test class User < ActiveRecord::Base belongs_to :subdomain validates_uniqueness_of :email, :scope => :subdomain_id class UserTest < ActiveSupport::TestCase def initialize_user @booboo = FactoryGirl.create(:subdomain, name: "booboo") @coocoo = FactoryGirl.create(:subdomain, name:
2011 Mar 04
1
How to modify the template path for ActionMailer used in a Ruby script ?
I am testing a ruby 1.9.2 script (it''ll be run in a cron task later...) in which I am trying to use ActionMailer All my files are in a single folder ''joinus_email - joinus_email joinus_email.rb notifier.rb - notifications joinus_email.html.erb joinus_email.text.erb running the script joinus_email.rb, (in which I defined the
2007 Feb 01
6
Using a nonstandard foreign key
Hopefully this is an interesting question. I have a "user" table with a field "email_address". I would like the part of "email_address" after the ''@'' to be a foreign key to a "companies" table populated by a companies that are clients. Any pointers on how to do this in rails? --~--~---------~--~----~------------~-------~--~----~ You
2010 May 10
6
feedback on a few ActiveSupport::Multibyte patches
Hi all, In response to Rodrigo Rosas''s message about mb_chars.upcase not giving the expected result on 1.9, I''ve done some work in a fork to make String#mb_chars always return an instance of a proxy class, both with Ruby 1.8 and Ruby 1.9. The end result of the patch is (hopefully) to make Rails'' multibyte functionality behave the same way in 1.8.7 and 1.9.x.
2007 Oct 12
5
deciphering objects.log
Howdy -- I''ve been tracking down mem leaks (oh, the fun...), and I think there is a clue in objects.log. There are a few mentions of this file, but usually Zed saying "look at this file and it will help you". Can anyone clue me in to what the actual columns mean? 18,Float,143952,256821,112869,,, 18,String,39543,41693,2150,24.727076,55.526376,2308.000000
2010 Sep 01
4
NoMethodError: undefined method `force_encoding' for "Conten
Hi everyone! Im trying to install mechanizer from http://github.com/tenderlove/mechanize. I`ve clone the project into /tmp folder. When I do rake inside the folder /tmp/mechanizer it gives me this error: mac159180:mechanize renatosis$ rake (in /private/tmp/mechanize) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -w -Ilib:bin:test:. -e ''require "rubygems";
2010 Jun 10
9
Rails3 beta4 + Ruby 1.9
When I try rails console using Rails3 beta4 and Ruby 1.9.1-p378 I cannot save a record: > rails console Loading development environment (Rails 3.0.0.beta4) ruby-1.9.1-p378 > g = Game.new => #<Game id: nil, player_id: nil, versus_id: nil, finished: nil, created_at: nil, updated_at: nil> ruby-1.9.1-p378 > g.save NameError: undefined method `<=>'' for class
2010 Dec 14
9
UTF-8 String.strip bug (and several over methods)
Hello, with Rails 3.0.3 "Café Noir ".strip => "Café noir" but "Café ".strip => "Caf\303\251" In fact, strip() doesn''t works if the last printable character is accentuated. Surprisingly " écologie".strip works fine. I''ve tried to dig deeper in active_support multibyte source code but didn''t found any solution.
2007 Nov 07
16
file access with mongrel running as windows service
i have an archive of documents (word, excel, jpeg, png, gif...) residing on a network share that is accessed via send_file. when running mongrel on the command line the files are properly delivered. with mongrel running as a service they don''t. now normally i would think that should be fixable by configuring the service to run under a user that can read the files.... but
2012 Feb 06
3
Bundler - how to re-install all gems after os update?
I had a working Rails setup using RVM on Ubuntu 11.10 with /home on a separate partition. I installed Ubuntu 12.04 (Alpha) on the root partition, leaving the home partition unchanged. I now find that some things don''t work, I think due to the fact that the system has been updated and versions of libraries have changed. For example I get: $ rails c
2004 Feb 04
1
RE: error (fwd)
Hi folks, I've got this funny problem with R's foreign library when reading stata files. One file consistently produces vector out of memory errors after gobbling up 2.7G of memory. I parsed through the read.dta function and figured out where the error occurs and the description is below. I am running R-1.8.1 on Debian stable system glibc2.2 kernel 2.4.24. R is is compiled from source
2010 May 12
10
Rails and PostgreSQL ???
Hi every one How are you? after a days and searching in forums i still can not find some things that helping me to connect Rails with postgre SQL of course those are helpful but not for a stupid person like me :D So i need my friends helping me here and advice me to how can i connect this two things (ROR and Postgre Sql) I need your help so much My eyes going blind because of searching and
2010 Nov 30
2
Help with yum and cpio: MD5 sum mismatch
I am trying to install Ruby-1.8.7p302 on a CentOS-5.5 server in preparation for a Rails-3 application deployment. I have downloaded the source from Rubyforge.org, unpacked it, and ran ./config and make. Everything built without error. I then ran checkinstall to create an rpm package. That too completed without error. However, when I try to install the resulting package using: yum localinstall
2008 Nov 19
1
mle2 simple question - sigma?
I'm trying to get started with maximum likelihood estimation with a simple regression equivalent out of Bolker (Ecological Models and Data in R, p302). With this code: #Basic example regression library(bbmle) RegData<-data.frame(c(0.3,0.9,0.6),c(1.7,1.1,1.5)) names(RegData)<-c("x", "y") linregfun = function(a,b,sigma) { Y.pred = a+b*x
2010 May 26
25
Extremely slow start up with ruby 1.9.1 vs 1.8.7
I created a fresh new rails app, no gems, no nothing. Completely unmodified. Doing anything that initializes rails takes 2 - 3 times longer in ruby 1.9.1 than it does in 1.8.7. Obviously with a fresh rails app, this is only 2 - 3 seconds extra. But with a decent sized app, this can take up to 25 seconds for rails to initialize, vs the 12 seconds in 1.8.7. I''ve been racking my brain on
2010 Dec 22
5
rvm, rails and sqlite
i need to use old version of ruby (1.8.7) and older version of rails (2.1.0) so i decided to use rvm. however since i''m somewhat new to ruby and rails i''m having issues. i created a gemset with rvm for my project, installed rails 2.1.0 into it. after that i created a project and a scaffolding for it. however i bumped onto an issue with sqlite3 (or sqlite3-ruby). it seems to me
2006 May 05
2
can you do global match regular expressions?
I cant figure out how to do global regular expressions in ruby. Im not even sure if its possible. In the "Programming Ruby" book there is no mention of it. Can you do this? text = "aaa1 bbb2 ccccc3 dddddd4 eee5" re = /\w+\d{1}/ matches = re.match text m[0] = "aaa1" m[1] = nil m[2] = nil and so on.... Is there any way to get an array of all the matches??
2007 Feb 26
1
some Mechanize objects never garbage collected?
Greetings, I''m using Mechanize to scrap dozens of pages and have noticed the size of my ruby process keeps growing. I set Mechanize.max_history to 0 with no effect on the memory use. I wrote a little test to show the objects left on the heap after mechanizing a single page and then doing a garbage collection. Sample list appended below. I can supply the test code if it helps.
2011 Apr 23
1
rake spec fails where rake spec:(models|controllers|views) pass
I''m still trying to work into Ruby 1.9.2 and am now experiencing something that makes no sense to me. Using rspec 1.3.2 and rspec-rails 1.3.4 with rails 2.3.11 on ruby 1.9.2-p180, when I $ rake spec:models they all pass. When I $ rake spec:controllers they all pass. When I $ rake spec:views they all pass. But when I $ rake spec I get <path to
2010 Apr 25
1
Has anybody succeed in getting Rails 3 to work in production?
Has anybody succeed in getting Rails 3 to work in production? I am trying with Apache 2.2 and Passenger 2.2.12 but no luck. If you have got Rails three to work in production on any server with any set up could you please post the details (howto?) or a link to where such information can be found. All input gratefully received. Paul Thompson -- You received this message because you are