similar to: "Device not configured" when posting comments to Typo

Displaying 20 results from an estimated 100000 matches similar to: ""Device not configured" when posting comments to Typo"

2005 Dec 21
6
Rails without a db - how to run tests
I''m writing a simple app that doesn''t need to use a database. I added :active_record to the config.frameworks -= line in environment.rb file. This lets me run ./script/generate fine without complaining about no connection. However if I try to run a functional test, it complains about no connection being established. Well...I don''t want a connection to be established.
2006 Apr 03
2
Capistrano - how do I set up the database config?
My app is set up without database.yml in version control. I created a shared_path/config dir, and put database.yml in it. After I update the code, I want to link the app''s database.yml file to the shared config. So I added this task desc ''Copy the database config'' task :after_update_code, :roles => :app do run "ln -s #{shared_path}/config/database.yml
2006 Jun 07
6
I want to stick my models in a module
I''ve got enough models now that I''d like to separate them into modules. For example, I have the class Player that I want to stick in the Trainer module. I''ve changed the definition to class Trainer::Player I''ve created a models/trainer dir, test/unit/trainer, and test/fixtures/trainer. Change the PlayerTest class to be Trainer::PlayerTest. I get the
2006 Jul 22
12
Community request - can someone show me REST?
I mentioned this in another thread, but I''ve got a formal request now. After reading tons of stuff about REST, I don''t really get it. I need to see an example. I''d like someone to write up an example blog app with these requirements - RESTful using the simply_restful plugin (or edge rails) - allows posting of comments to articles - has categories for posts No need
2006 Jan 30
4
What is supposed to happen when you run dispatch.fcgi?
I''ve seen a number of posts where someone says, "What happens if you just run dispatch.fcgi directly?" Every time I do it, I get a "500: internal server error" message. I was just curious if that''s what''s expected running it directly. I assume so, because my apps all work fine, but that''s always bugged me. Pat
2006 Mar 19
4
Trouble with composed_of
I''m trying to use composed_of within my model. I have a field in my database named ''card1'', which is simply a string. I have this in my model class Player < ActiveRecord::Base composed_of :card1, :class_name => ''Card'' end class Card attr_reader :value, :suit def initialize(s) @value = s[0].chr @suit = s[1].chr end end The
2007 Feb 21
1
Rendering all the elements when calling Array#to_xml
When I call to_xml on an array, I want it to get the XML for all the elements in it. I''ve defined to_xml in my class. >> r.to_xml => "<video><id>1</id><views>2</views></video>" >> a = [r] => [#<StatisticsReport:0x3259f38 @video_id=1, @views=2>] >> a.to_xml => "<?xml version=\"1.0\"
2007 May 21
4
Just upgraded to 1.0.0, should render_text isn''t working for me
I finally got around to upgrading from 0.8.2 (!!). I had a spec which looked like specify "should render abc123" do controller.should_render :text => "abc123" get :key end With 1.0.0, the new spec is it "should render abc123" do get :key response.should render_text("abc123") end However it doesn''t work, giving me the error: undefined
2006 Apr 01
3
Can I do a redirect in an ajax request?
I''ve got a form on my page, and when the user submits it, sometimes I''d like to update an element on my page, and sometimes I''d like to redirect the browser to another url entirely. However if I do redirect_to, it just updates the element with the results of the redirect. Is it possible to do what I want, or will I need to use RJS to do this? Pat
2007 Feb 23
4
How can I spec this? The method gets passed a block...
I''m using Jim Weirich''s Builder library. The code I want to spec is xml.video do xml.id @video_id xml.views @views xml.date(@date.to_s) if @date end I''d like to mock it, rather than asserting that the XML is the right string. I can do one spec: specify "should create a video tag" do @mock_builder.should_receive(:video)
2006 Apr 10
6
Object isn''t being saved when called through association
I have three models in this small game I''m working on - the Game, Players, and Turns. A Player should be able to rescue another Player on any given turn. So it looks like this: class Game has_many :players has_many :turns def rescue_player(p) t = turns.last t.rescued = p t.save end end class Turn belongs_to :rescued, :foreign_key =>
2009 Jan 25
0
Typo 5.2 for Rails 2.2 released
Hello, We''re very pleased and proud to announce the release of Typo 5.2 "Helmut Newton" for Rails 2.2, the famous blogging engine, 4 months after our last release. Typo 5.2 is more than a simple port from Rails 2.0.2 to Rails 2.2, it''s a major, deep, rewrite of the application. We''ve ditched lot of code, aiming at stability and performance, dividing
2007 Apr 09
7
RCov results seem to include the spec files
I saw the RCov page at http://rspec.rubyforge.org/tools/rcov.html and decided to add it to my project. My rakefile looks like this: require "rake" require "spec/rake/spectask" desc "Run all specs with RCov" Spec::Rake::SpecTask.new("spec:rcov") do |t| t.spec_files = FileList["spec/**/*_spec.rb"] t.rcov = true end When I run rake spec:rcov,
2007 May 21
4
Spec''ing redirect with arbitrary parameters
I''ve got the following expectation: response.should redirect_to(:action => "new", :video_id => "1", :process_id => "2", :origin_id => "3") that fails with this error message: expected redirect to {:video_id=>"1", :process_id=>"2", :origin_id=>"3", :action=>"new"}, got redirect to
2006 Apr 03
4
Clearing out filters in ActionController
I want to run a single filter in my application.rb file, and then if a certain condition is true, end the action''s processing immediately. Right now I''m using prepend_before_filter to ensure that it gets run first, but some of my around_filters are still being processed. Is there a way that I can clear out all the filters that should be run? Basically it''ll look
2006 Dec 20
16
Edge RSpec on Rails...what did I forget?
Started a new Rails project, and installed RSpec and the Rails plugin vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/trunk/rspec) - 1332 vendor/plugins/rspec_on_rails (svn://rubyforge.org/var/svn/rspec/trunk/rspec_on_rails/vendor/plugins/rspec_on_rails) - 1332 Generated the rspec file, created a model...the spec runs fine if I do ruby spec/models/foo_spec.rb. Running rake though gives
2006 Nov 03
10
[PLUGIN] rspec_resource_generator - RESTful scaffold generator with RSpec specifications
rspec_resource_generator ======================== By Pat Maddox Use this generator to generate RESTful scaffolding with RSpec specifications. Syntax is exactly the same as the scaffold_resource generator: ./script/generate rspec_resource ModelName [field:type field:type] When you run this generator, it will create a migration, model, and model spec file. In addition, it gives you a RESTful
2006 Aug 05
4
Can we use ActiveResource yet?
I need to split some information up between two servers, and wanted to use REST for it. I can write the REST server really easily...but I don''t know how I can actually use it. I downloaded Rails trunk to mess with ActiveResource, but it seems that it doesn''t have create functionality enabled yet. Is it possible to use AR fully? If not, what''s the best way to consume
2007 Feb 07
5
Mocking ActiveResource
I want to use ActiveResource in my app. Instead of hitting server though, I want it to load from a file when I call find. Any clue how I do that? Pat
2007 Sep 04
7
Rake tasks getting in the way of edge (uses gem instead)
So I''d been running gem releases of rspec for the past several months, and I installed edge rspec so that I can use Story Runner. I''m running into a problem because I''ve got a couple rake tasks that reference "spec/rake/raketask". If I try to run "rake spec" then it pulls in the gem version instead of the plugin version. rake blows up saying that