Displaying 20 results from an estimated 1000 matches similar to: "rake: uninitialized const ActionController::TestUploadedFile"
2007 Dec 11
14
Attachment-fu + Story Runner
Hi all,
I''m trying to run a Story Runner integration test that uploads a file
through Attachment-fu.
I''ve tried various ways of specifying the file data, from custom mocks:
class MockFile < Struct.new
(:original_filename, :read, :content_type); end
fdata = MockFile.new "test_upload.txt", "Test Upload", "text/plain"
to
2007 Mar 11
4
Faking it... import local files into attachment_fu
Hello,
I''m working on an import utility that will match the functionality of
uploading an object of a model that uses attachment_fu for
thumbnailing, etc.
Rather than uploading the file via a form, I want to populate the
params[:image][:uploaded_data] with data from a file already on the
server''s file system.
So far, I''ve been able to copy to an instance of Tempfile
2006 Mar 29
3
Loading records during class definition
I''ve created a look-up table in my database that currently has 4
rows. I want to access these as constants in the application because
that''s effectively what they are. I tried this...
class StockRuleLevel < ActiveRecord::Base
has_many :stock_rules
SITE = find(:first, :conditions => "type_code = ''site''").id
MAKE
2006 Mar 19
3
Can''t add data during migration if column is called "type"
Hi
I''m new to Rails. This is my first application and I''m trying to set
up a schema I''ve hand-crafted as a migration.
Does anybody know why this...
# deposit_types
create_table :deposit_types do |table|
table.column :type_code, :string, :limit => 20, :null => false
table.column :description, :string, :limit => 50, :null => false
2007 Sep 26
0
[Story] passing a file using post
I''m trying to run a story for sample caboose that I created.
I haven''t changed any of the sample application code.
When I try to do the following:
When "creating a new asset named",
File.open(''/Users/multimedia/desktop/sample/assets/bridge.jpg'')
do |path|
post_via_redirect "/users/#{@user.login}/assets", :asset => {
:uploaded_data
2007 Nov 09
9
fixture_file_upload and edge rspec?
Hi all,
I had some specs that were using fixture_file_upload that were
passing just fine. Then I froze edge rails to get some 2.0
functionality, then a I upgraded to trunk rspec to deal with
uninitialized constant ActionView::Helpers::JavaScriptMacrosHelper
After a couple other of tribulations, I have now gotten down to just
a couple of not passing specs, all using the fixture_file_upload.
2008 Mar 20
0
Having trouble with a remote-crop-then-resize using attachment fu =(
Basically, I''m trying to crop multiple images out of a remote/original
scene.. Think flickr ''tagging'', only, the pixs in the tagged boxes
become their own unique images.. by way of simulating an upload from
the controller using attachment fu.. can''t quite figure out the
specific method in fu that would allow me to do this.. I''m so near the
edge right
2007 Aug 18
0
RSpec and acts_as_attachment
Hey guys,
I''m getting a weird error when trying to test something like the
following. It''s a model that is using acts_as_attachment but the
weird thing is the equivalent Test::Unit case passes. Does anyone
have any ideas?
Best,
Dave
# it was a Test::Unit case first
def test_should_be_invalid_without_file
UserFile.any_instance.expects(:with_image).never
2007 Aug 22
8
How to spec an attachment_fu model
First off, I''m not trying to spec attachment_fu, I know it''s been tested.
But, I added some code to that model that I do need to test. Basically,
I need to somehow fulfill the "uploaded_data" property so I can actually
run my tests(otherwise they fail because of validations). The
"uploaded_data" field is what would grab the multipart data from form.
Here
2010 Apr 24
2
problem using attachment_fu with S3
Hi,
My S3 bucket is located in the US
I have attachment_fu working when using file system storage
I have sw-swf upload plugin working with my S3 account
but I can not get attachment_fu to work with S3 storage.
the error I get is :
AWS::S3::RequestTimeout in Upload filesController#create
Your socket connection to the server was not read from or written to
within the timeout period. Idle
2007 Dec 08
3
Uploading photos using facebook & attachment_fu
Hi All,
I''m trying to use a form to upload a photo that I will save using
attachment_fu. I''m very new to Facebookr so I apologize if this is covered
somewhere, but I''m kind of stumped.
Here''s what I''m doing now:
<% facebook_form_for(:my_object, :url => { :action => ''upload_photo'', :id =>
params[:id] }, :html => {
2012 Nov 12
1
undefined method `original_filename' for nil:NilClass
Hi, although I saw this problem in other blogs, I couldn''t make it works.
My view:
*<%= semantic_form_for :routes_status_race, :url =>
status_race_admin_routes_path do |f| %>*
* <% contact_array = Contact.all.map {|contact| [contact.name,
contact.id]}%>*
* <% route_importer_array = RouteImporter.all.map {|importer|
[importer.name, importer.id]}%>*
* <%=
2010 Jul 11
0
Attachement_fu error when updating existing photos
Hi,
I am attempting to replace an exiting photo with a new one uploaded by
the user. I am using attachment_fu and I am coming up with the
following exception:
can''t convert nil into String
/vendor/plugins/attachment_fu/lib/technoweenie/attachment_fu/backends/file_system_backend.rb:23:in
`join''
2009 Mar 18
1
uninitialized constant ActionController::AbstractRequest (NameError) with rails 2.3
Hi guys,
I''ve just installed Rails 2.3 and I am using the clearance plugin
with cucumber features. When I run rake features I get this
"uninitialized constant ActionController::AbstractRequest (NameError)"
error from webrat trying to call AbstractRequest which now is called
Request (I think). My question is : Is there any way to alias the old
name to have backwards
2011 Jan 26
0
[Rails 2.3.10] uninitialized constant ActionController::AbstractResponse
I am testing some code under 2.3.10 ( w ruby 1.8.7) and when trying
only to start the console , I get the error :
=====
/gems/activesupport-2.3.4/lib/active_support/dependencies.rb:440:in
`load_missing_constant'':NameError: uninitialized constant
ActionController::AbstractResponse
ruby-1.8.7-p330 :001 >
I cannot see what happen in any log ... where or how can i get some
info on the
2007 May 22
3
Comments wanted about spec''ing out a couple controller methods
(oops, accidentally sent this to the rspec-devel list, sorry about that)
Could someone help me spec out these Rails controller methods? I
don''t know where to get started, especially with the transaction
stuff. Or, if anyone else could suggest ways I could improve the
code, that would be great as well.
Puzzle has_one Media. Both are AR model objects.
class PuzzlesController <
2008 Nov 21
1
uninitialized constant ActionController::Caching::Fragments
Hey, i''m trying to use "s3cache" plugin with my app, but after adding it
to my vendor/plugins directory and following the install steps i''m
getting this error after running script/server:
/Users/richardschneeman/Documents/AptanaStudio/slangasaurus/vendor/rails/activesupport/lib/active_support/dependencies.rb:275:in
`load_missing_constant'': uninitialized
2007 May 05
0
acts_as_attachment - no thumbnails?
the full-size pics upload OK, but no thumbs or resizing. There are no
errors or exceptions that I can see, just not getting any thumbnails.
The DB column ''thumbnail'' is always NULL
rmagick-1.15.6 is freshly installed.
I have the :thumbnails stuff setup per
http://weblog.techno-weenie.net/articles/acts_as_attachment/thumbnailing
using a model like this:
class EventPic
2009 Apr 27
2
uninitialized constant ActionController running Cucumber features in Aptana/RadRails IDE
I''m just starting on BDD. I installed the gems for webrats and
cucumber.
I also ran the following in the Ruby shell:
>rake gems:install RAILS_EN=test
>script/generate cucumber
These commands seemed to create the expected features and lib folders
in my project.
I''m using the eclipse framework with Aptana and RadRails as my IDE.
However, when I run:
>cucumber features
2007 Aug 14
2
AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb
Before I chalk this up as a bug and report it, I just want to make sure I''m not
doing something silly.
Running ZenTest''s autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the
following failed test:
ActiveRecord::AssociationTypeMismatch in ''User should create an avatar with
uploaded_data''
Avatar expected, got Avatar
This only happens with that exact