Displaying 18 results from an estimated 18 matches for "kmandrup".
2011 Jan 02
3
undefined method `run_all' for :Array
I''m using the latest ruby 1.9.3-head and recently whenever I run rspec
(2.2+) I get the following error:
I have seen others have run into this issue, but to resolve it just
rolled back to a previous version of rspec or it there a better way?
ruby-1.9.3-head/gems/rspec-core-2.3.1/lib/rspec/core/hooks.rb:116:in
`run_hook_filtered'': undefined method `run_all'' for []:Array
2010 May 12
8
Trouble developing Rails plugins/gems with generators
Hi,
I''ve been trying to develop a Rails gem/plugin with generators for
Rails 3. I first had a separate gem project with a gem statement in my
Gemfile with a :path option to point at it. But then I had to run $
rake install on each change in my gem to have Rails pick up on it. I
have now instead put my generators inside RAILS_ROOT/lib so they are
easier to test/develop.
lib/generators
-
2010 Jun 10
1
RSpec 2 equivalent for: assigns[:message].should == @message
describe MessagesController, "POST create" do
before(:each) do
@message = mock_model(Message, :save => nil)
Message.stub(:new).and_return(@message)
end
context "when the message fails to save" do
before(:each) do
@message.stub(:save).and_return(false)
end
it "assigns @message" do
post :create
assigns[:message].should
2010 Feb 19
1
env: ruby1.9: No such file or directory - FIX
In the root of a rails 3 app:
$ rails
env: ruby1.9: No such file or directory
$ script/rails
env: ruby1.9: No such file or directory
$ script/rails generate
env: ruby1.9: No such file or directory
$ ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-darwin10.2.0]
$ mate script/rails
#!/usr/bin/env ruby1.9 --> #!/usr/bin/env ruby
--
You received this message because you are subscribed
2009 Aug 29
2
Users, Roles and Permissions
Hello,
I''m currently working on a text-based roleplay browser game, and i''m trying
to figure out what the best approach would be in order to create a system
that allows me to assign roles to a user, and permissions based upon the
role a user has.
I''ve been thinking about creating a model User, which has_many :roles, and
with the Role model which has_many :permissions.
2010 May 13
1
link_to using smart API
Trying to use the "smart" API for link_to
def create_link(object, label = nil)
label ||= auth_labels[:new]
link = link_to(label, [:new, object]) if can?(:create, object)
link.sub /new\./, ''new/''
end
But this generates a link like /projects/new.1 , instead of /projects/
new
I would assume it would make sense to pass it the class instead, like
this, sense in
2010 May 10
3
Using Rails 3 edge to circumvent current_period bug?
I get an error using Rails 3 beta3 on Ruby 1.9.2-preview1
undefined method `current_period'' for nil:NilClass (NoMethodError)
This commit should fix it
http://github.com/rails/rails/commit/a0cc94b32e5b4e4dce50787eed1208406f99ea82
But I forgot how to ensure I am running on edge with Rails 3.
Is it a special bundler command I need to use?
Thanks!
--
You received this message because
2010 Jan 18
2
Can't get gem bundler to work with either rvm 1.9.1 and 1.9.2
I installed the bundler, no problem - but it seems to have screwed up
my gem repository in both cases!?
What to do?
kristian-mandrups-macbook-pro:~ kristianconsult$ sudo gem install thor
/Users/kristianconsult/.rvm/gems/ruby/1.9.1/gems/bundler-0.8.1/lib/
rubygems_plugin.rb:2:in `require'': no such file to load -- bundler/
commands/bundle_command (LoadError)
from
2010 Jan 20
2
Rails 3 Problem: no such file to load -- rails (LoadError)
I just ran the gem bundle on the third_rails demo app, but for some
reason rails can''t be loaded!?
kristian-mandrups-macbook-pro:third_rails kristianconsult$ rails -v
Rails 3.0.pre
kristian-mandrups-macbook-pro:third_rails kristianconsult$ script/
generate model Post name:string
/Users/kristianconsult/my_rails/rails3_apps/third_rails/config/boot.rb:
71:in `require'': no such
2010 Jun 01
1
RSpec book errata #57 - undefined method `include' : what to do?
http://pragprog.com/titles/achbd/errata
nr 57:
Ruby 1.8.7
expected [] to include "Welcome to Codebreaker!"
Ruby 1.9.1
undefined method `include'' for #<Object:0x80b32c90> (NoMethodError)
---
class Output
def messages
@messages ||= []
end
def puts(message)
messages << message
end
end
Then /^I should see "([^\"]*)"$/ do |message|
2010 Jun 10
1
RSpec 2: uninitialized constant - mocking belongs_to AR relation
gems/ruby-1.9.2-head/bundler/gems/rspec-
core-2398fcadf5beb256bed9c548c59445d3b4c8a047-master/lib/rspec/core/
backward_compatibility.rb:26:in `const_missing'': uninitialized
constant Message::User (NameError)
from /Users/kristianconsult/.rvm/gems/ruby-1.9.2-head/bundler/gems/
rspec-expectations-996c752171a0a0e16347e934dadc25767e31186c-master/lib/
2010 Aug 16
0
RSpec 2 matchers 'code-spec' and 'file-spec' released
Spec your generated Ruby code files
code-spec at: http://github.com/kristianmandrup/code-spec
Spec your file structure (files, dirs, symlinks)
file-spec at: http://github.com/kristianmandrup/file-spec
More to come...
2010 Apr 15
1
Installing mongrel for Rails 3 app?
I first tried a simple
gem ''mongrel''
Then later the solution found here
http://jan.varwig.org/archive/rails-3-and-mongrel
gem "mongrel"
gem "cgi_multipart_eof_fix"
gem "fastthread"
gem "mongrel_experimental"
But still can''t get it to work...
Anyone?
--
You received this message because you are subscribed to the Google
2009 Sep 09
0
Getting started with Rake - how do I copy a directory of assets to RAILS_ROOT + "/public"
I am just getting started with Rake. I am trying to create a rake task
from within a rails plugin to copy some asset files (inside /assets in
my plugin folder) to my rails application /public folder.
How can I achieve this?
I am not sure whether to use FileUtils or File. Where AM I in rake
terms. No matter what I do it keeps saying it can''t find the file. Do
I need to use File.join or is
2010 Jan 29
1
Rails 3 App generator - could not find source path
Could not find "README" in source paths.
module Nifty
module Generators
class AppGenerator < Base
def self.source_root
@source_root ||= File.expand_path(File.join(File.dirname
(__FILE__), ''templates''))
end
def initialize(*args)
super
end
def create_root_files
# puts "Source path:
2010 Jul 10
0
`method_missing': undefined method `i18n' for #<Rails::Railtie::Configuration:0x000001010fce98>
I have recently upgraqded to Ruby 1.9.2-rc1 and reinstalled rails 3
beta 4 with all the dependencies. I have run bundle install in my
rails project. Now I am trying to run some tests...
My test_helper.rb file looks like this:
# test_helper.rb
require ''rubygems''
require ''test/unit''
require ''rails/all''
$ gem list
i18n (0.4.1, 0.3.7)
2010 Feb 25
0
Rails problems running rake and other tasks - undefined method `action_controller'
I suddenly have a major problem in all my Rails 3 apps:
$ rake db:migrate --trace
rake aborted!
Don''t know how to build task ''db:migrate''
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/
rake.rb:1728:in `[]''
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/rake-0.8.7/lib/
rake.rb:2050:in `invoke_task''
2010 Jan 20
1
CRITICAL: Rails 3 error : parser.bundle unhandled exception!!!
kristian-mandrups-macbook-pro:rails3_apps kristianconsult$ rails my_r3
create
create README
create .gitignore
create Rakefile
create config.ru
create Gemfile
create app
...
kristian-mandrups-macbook-pro:my_r3 kristianconsult$ script/console
/Users/kristianconsult/.gem/ruby/1.8/gems/json-1.1.9/ext/json/ext/
parser.bundle: unhandled exception