Displaying 20 results from an estimated 300 matches similar to: "Does RSpec interfere with Pathname#dirname or Pathname#realpath ?"
2011 Mar 04
5
How to intercept an instance method from StdLib (1.9.2)
Hi,
I''m struggling with something that seems to be simple, and I''ve not
had any joy following the RSpec books suggestions (p. 187).
I''d like to test that a method raises and error when a file is not found.
I''ve tried adding this in my example just before I call my method, but
it never seems to get invoked.
Pathname.stub(:exist?).and_return(false)
The whole
2011 Feb 10
8
rvm install 1.8.7 prompts "There has been an error while running make. Halting the installation."
I want to work with both Rails 2 and Rails 3 projects.
I have RVM installed.
When I upgraded to Rails 3, Installed RVM via terminal:
bash < <( curl http://rvm.beginrescueend.com/releases/ … ll-latest)
version=$(curl http://rvm.beginrescueend.com/releases/ … sion.txt);
mkdir -p ~/.rvm/src/ && cd ~/.rvm/src/ && curl -O
http://rvm.beginrescueend.com/releases/ … on}.tar.gz |
2010 Nov 07
2
Hooks before a scenario but not the background: possible or bad practice
Hi,
I''d like to activate FakeFS for some scenarios, which I tag @fakefs,
however it seems Before(''@fakefs'') runs before the background of the
feature - unfortunately this clobbers Grit, and I can''t
Grit::Repo.new(...) in the backbround.
Is it currently possible to get a hook to run before a scenario, but
not the Background of the feature?
Or am I mistaken in
2011 Apr 12
4
OS X - `require': no such file to load -- sqlite3/sqlite3_native
I''ve searched and search, tried a number of things like unstalling
sqlite3 and reinstalling. Reinstalling Rails, building sqlite3 from
source, etc. Nothing seems to work. When I try to start up my server I
get the following:
MacBook-Pro:splash Ross$ rails server
/Volumes/Macintosh
HD/Users/Ross/rails_projects/splash/json/ruby/1.9.1/gems/sqlite3-1.3.3/lib/sqlite3.rb:6:in
2011 Feb 06
1
Psych can't load LaTeX entities file
Hi there,
I wanted to use RedCloth with my RubyOnRails 3 application, but it seems
that RoR uses 1.9.2''s Psych by default as the YAML parser if available,
and Psych fails to load the LaTeX entities file:
====================================================================
#ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [x86_64-linux]
irb(main):001:0> Dir.pwd
=>
2011 Feb 06
2
Controller Testing + Devise = boom (undefined @controller, request)
Here I am, trying to learn TDD and BDD. Getting start, most simple
case, and the world is falling apart:
My test code:
it "should respond with success" do
puts ''hi''
# get :new
# response.should be_success
end
My stack trace:
$ rspec spec
"controller: nil"
F
Failures:
1) VideosController new exposes request and response before and
2011 Mar 22
2
Problems with SQLite3
Hi!
I''ve got a very strange problem. Suddenly the SQLite3 Backend stopped
working.
Example 1:
> rake db:rollback
== CreateProducts: reverting
=================================================
-- drop_table(:products)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: near "CASCADE": syntax error: DROP TABLE
2011 Apr 18
2
rubygems fail - require hpricot!
Hi guys,
I wanted to fetch some info from webpage and use it in my db. I read
hpricot is one way to do it. But the problem is I''m unable to use it
with my app. For some reason after successfully installing hpricot it
fails when I try to use it in the rails console.
I''ve been trying to fix this for the last four-five days. I''m stumped !
I tried re-installing everything
2011 Jan 10
2
Problem with multiple requires in Ruby DSL
I''m loving playing around with the DSL. There are some problems (ie
5237), but now that it''s Ruby, I can fix them! woo!
However, I''m stumped on this one, which may or may not be related to
the DSL. When trying to have a resource have a simple dependency on
two things at once, it simply fails, and I''m stumped as to why. The
error message is:
Parameter
2011 Feb 05
1
ActionMailer::Base.default_url_options
Hi,
I want so set a default url for ActionMailer. I know,
ActionMailer::Base.default_url_options is deprecated, so I use
config.action_mailer.default_url_options = {
:host => "localhost"
}
in my environments (test.rb, production.rb, ...). The problem is, I get a
deprecation error and rails won''t start. I have no solution...
Any hints for me?
Testing started at
2011 Jan 23
2
How I do to run Rails on Apache?
Scenario: Windows Vista - Rails 3.0.3 - Rub(ies)1.9.2-p136 & 1.8.7p330
- MySQL5.5 - Apache2.2 - git/cygwin -everything setup and working, BUT
WEBrick is becoming temperamental. I want to run Rails on Apache.
Is it possible? What should I do.
I made some simple tests like build applications with Ruby 1.9.2 and
after with 1.8.7. Rails on WEBrick set the tables and makes the models/
migrations
2011 Mar 18
2
How do I delete multiple blank variables from a data frame?
Dear List Members,I have 55 data frames, each of which with 272 variables and 267 observations. Some of these variables are blanks but the blanks are not the same for every data frame. I would like to write a procedure in which I import a data frame, see which variables are blank, and delete those variables. My data frames have variables named P1 to P136 and Q1 to Q136.
I have a couple of
2011 Feb 09
0
Mysql2::Error: SAVEPOINT active_record_1 does not exist
Hi,
I''m switching the database of a rails 3 app I have developed from
postgres to mysql so that I can avail of amazon''s rds. Before I make
the change I have been running my test code using mysql on my dev
machine with the mysql2 adaptor . My test code is throwing up some
errors that I haven''t quite been able to get to the bottom of yet.
Basically I have a model that is
2011 Jun 17
7
Encoding
What''s a good solution for fixing character encoding problems for
compatibility between ascii and utf-8? The database is postgres and
is encoded in utf-8.
Once in awhile there will be a compatibility error from strings from a
webform.
Is there a command to fix this besides using
a_string.force_encoding(''utf-8'')? Even this doesn''t seem to always
work either.
2011 Nov 14
2
Looking for environment setup help
Can anyone help with setting up my environment? This all started when
I tried to install Aptana Studio 3, and want to use the debugger. I
have installed ruby 1.9.2, and rails 3.1.0. When I try to install the
ruby-debug-base gem, I get an error that does not make sense to me -
it tells me it needs ruby version > 1.8.7. Here is the error message,
along with other details. I am running this
2011 Feb 07
0
Error loading rubygems
Hi,
During an operation (rspec related) that required loading rubygems
(from config/boot.rb file) I got the following error message:
~/config/boot.rb:1:in `require'': no such file to load -- rubygems
(LoadError)
~/config/boot.rb:1
from ~/config/application.rb:1:in `require''
from ~/config/application.rb:1
from ~/config/environment.rb:2:in `require''
from
2011 Jan 08
6
Need help in Installing Rails 3.0.3
This is my gem env
RubyGems Environment:
- RUBYGEMS VERSION: 1.3.7
- RUBY VERSION: 1.9.2 (2010-12-25 patchlevel 136) [i686-linux]
- INSTALLATION DIRECTORY: /home/arjunkishore/.rvm/gems/ruby-1.9.2-p136
- RUBY EXECUTABLE: /home/arjunkishore/.rvm/rubies/ruby-1.9.2-p136/bin/ruby
- EXECUTABLE DIRECTORY: /home/arjunkishore/.rvm/gems/ruby-1.9.2-p136/bin
- RUBYGEMS PLATFORMS:
- ruby
-
2011 Mar 29
18
Rails 3.0.6.rc1
ZOMG HAPPY TUESDAY (UTC-7)!!! <3<3<3<3<3
I am happy to announce that the first release candidate for Rails 3.0.6 has
been pushed to rubygems.org.
## Release Candidate: What does it mean?
The release candidate is very similar to what we will actually release for
version 3.0.6. The reason that we release an RC is so that the community can
have a chance to postpone or veto commits
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
2011 Apr 01
0
package MICE, squeeze function, calling several variables at once
Hello everyone!I have a data set with missing observations that I am trying to impute. I am using MICE and I would like the imputed values to all be positive. I have two types of variables: prices (P1 to P136) and quantities (Q1 to Q136) and I also want the range of these two types to be different. Besides these variables. I am using the squeeze function but I am unable to set it such that I