Displaying 20 results from an estimated 1100 matches similar to: "Should to_io be added to ActionDispatch::Http::UploadedFile?"
2012 Mar 04
4
How to retrieve a FileBlob from 'ActionDispatch::Http::UploadedFile' instance?
I have used ''remotipart'' gem to upload files asynchronously to server side.
The instance passed to the server side is of ''UploadedFile'' .
The Rails API mentions all the methods( like read(), open() ) and
attributes for the class, however I am not sure how to retrieve the File
and store it on the database. The documentation hardly says anything.
Googling
2011 Jul 14
0
Converting an Uploaded File to a string while maintaining binary data
Ok so it boils down to this I uploaded a picture into a
ActionDispatch::Http::UploadedFile and want to convert it to a string
before I send it off google storage. When I do this it complains about
having null characters.
I had the same problem when I was experimenting with files from my hard
drive with the same function. I was able to do it with:
File.open( ''filename'',
2013 Sep 30
0
TypeError: no implicit conversion of Symbol into Hash when submitting form to upload files
I''m currently new to Rails and Ruby and I''m trying to learn from my
mistakes, this time I''m trying to upload 2 files from a form for later
processing, however, after I hit the "Submit" button. I keep getting this
error:
TypeError in UploadFilesController#create
app/controllers/upload_files_controller.rb:28:in `new''
2011 Jan 10
0
Can't use ActionDispatch::Request in Rails middleware because path_parameters get lost
Hi,
I just encountered a bit of an issue where we call request.params of
an ActionDispatch::Request inside a rack middleware right before a
Rails 3.0.3 app. The issue is that the path_parameters never appear
in the parameters hash if you call request.params before the rails
app.
It seems that that the requests.params method memoizes itself in
"action_dispatch.request.parameters"
2010 Jun 12
0
[PATCH] ActionDispatch MemCacheStore violates encapsulation principle
When pass :cache param to ActionDispatch::Session::MemCacheStore, it should
be removed from options, otherwise it remains "published". This violates the
OOP encapsulation principle.
I created a LH ticket with a patch
http://bit.ly/cGDaWs
Luca
--
lucaguidi.com
twitter.com/jodosha
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Nov 19
1
Help: delegated association 'App' returning ActionDispatch::Integration::Session instead
class Foo < ActiveRecord::Base
has_one :bar
delegate :app, :to => :bar
end
class Bar < ActiveRecord::Base
belongs_to :app
def self.attribute_column_names
return @@attr_columns if defined?(@@attr_columns)
readers = content_columns.map { |n| n.name.intern } -
[:created_at,:updated_at]
@@attr_columns ||= readers.map { |k| [k, "#{k}=".to_sym] }.flatten
end
2011 May 16
2
Cannot get multipart => true , running well in my form when using remote => true
I have a simple form , with a file field
= form_for (Clip.new), :html => {:multipart => true} , :remote =>
true , do |f|
= f.hidden_field :user_id, {:value => current_user.id}
= f.text_field :name
= f.text_area :description
= f.file_field :image
= f.submit I18n.t(:add)
generating the html code
<form accept-charset="UTF-8"
2011 Jul 31
2
Looks like an error in docs for ActionDispatch::Routing::Mapper::Resources
Please take a look at this page:
http://api.rubyonrails.org/classes/ActionDispatch/Routing/Mapper/Resources.html#method-i-resource
It reads:
:path
Set a path prefix for this resource.
resources :posts, :path => "admin"
All actions for this resource will now be at /admin/posts.
For me (Rails 3.0.9) it routes to just "/admin", not "/admin/posts".
2011 Aug 19
1
How to post a file via HTTP as multipart/form-data to Facebook?
I would like to post a new photo to a user using `Net::HTTP::multipart`
from a Heroku application to Facebook.
I have the following JSON object:
{"message"=>"My message",
"image"=>#<ActionDispatch::Http::UploadedFile:0x00000004242490
@original_filename="neEZYMAnBI.jpg",
@content_type="application/octet-stream",
2013 Jun 22
4
ActiveRecord::Base.transaction - SystemStackError - stack level too deep:
Im having an issue that seems to only happen when trying to use a
transaction. Ive used transactions many times in the past and Im at a loss
as to why im getting the stack level too deep problem.
SystemStackError - stack level too deep:
actionpack (3.2.13) lib/action_dispatch/middleware/reloader.rb:70:in `''
I have a StackOveflow with more detail -
2012 Jun 08
1
[Rails 3.2.5] Rails: unit test fixture_path : fixture_file_upload cannot find the file ...
I am trying to perform a test unit, using FactoryGirl
include ActionDispatch::TestProcess
FactoryGirl.define do
factory :article do
.......
photo { fixture_file_upload ''/files/test.jpg'', ''image/jpg'' }
end
end
IN mt test_helper.rb I defined the fixture_path
def fixture_path
File.dirname(__FILE__) + "/fixtures/" #
2010 Dec 15
2
Error reverse engineering MySQL with RMRE
Hi
I am been trying in vain to auto-gen models by reverse-engineering
mysql using RMRE. It complains mysql2 gem missing but as seen in my
Rails environment below, it is there.
Here''s my Rails environment and RMRE error. Experts... please help!
Thanks a ton in advance!!
===
Ruby version 1.9.2 (x86_64-linux)
RubyGems version 1.3.7
Rack version 1.2
Rails version 3.0.3
Active Record
2015 Nov 05
0
Install R on Ubuntu with libcurl support
The one strange thing I am now noticing is that precise does not have
libcurl listed as a dependency. If you go to
https://cran.r-project.org/bin/linux/ubuntu/precise/Packages and look
for "libcurl" it is not listed. The other Ubuntu builds, such as
trusty or wily do list it.
On Thu, Nov 5, 2015 at 12:01 PM, Michael Coyne <mikeycgto at gmail.com> wrote:
> Thanks for the advice.
2009 May 11
7
Upload file with url parameter
I want to upload file using get method.
for example, "http://www.mydomain.com/upload?file=c:\test.exe" upload
my local file to the remote server.
I found one useful link about file uploading here(http://
www.tutorialspoint.com/ruby-on-rails/rails-file-uploading.htm).
Even I''ve changed some code in order to fit my rails version, it
worked well. But the problem is I have use
2011 Aug 31
5
3.1rc8 - posting files in a test no longer works
A previously working test, that posted a file object no longer works
in the latest 3.1. The test looks like this:
params[:media][:new_attachment] = File.open("#{Rails.root}/test/data/
less_than_100.png")
post :create, params
In the controller, I obviously expect params[:media][:new_attachment]
to be a File object - and it used to be. Now it looks like #inspect
has been called on the
2013 Mar 26
2
Using rack.hijack with ActionController::Live
Pinging @tenderlove
Some questions on how best to move forward with this:
1.) AC::Live is making use of the stream object on
ActionDispatch::Response. Should the rack.hijack_io object be used instead
of this in AC::Live or should ActionDispatch::Response be changed to use
rack.hijack_io?
2.) What do you think about changing AC::Live to work with adapters? I
suspect the primary use case for
2015 Nov 05
3
Install R on Ubuntu with libcurl support
Thanks for the advice. Going to look into this more this evening and
hopefully get everything working.
Thanks again!
On Thu, Nov 5, 2015 at 11:56 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
>
> On 5 November 2015 at 11:44, Michael Coyne wrote:
> | What do you have installed as far as libcurl goes? Would you mind
> | listing your packages and greping for libcurl entries.
2011 Mar 11
12
A file-upload suddenly seems to be nil
Hi there,
I posted this issue
<https://groups.google.com/forum/?hl=de#!topic/carrierwave/ergk9LaO68k>at
the carrierwave-group, but I''m beginning to think this rather is a
rails-issue than a problem with carrierwave. The problem''s this:
I have 2 models, ''article'' and ''upload''. article has_many :uploads. In my
article_controller i
2015 Nov 05
0
Install R on Ubuntu with libcurl support
On 5 November 2015 at 11:44, Michael Coyne wrote:
| What do you have installed as far as libcurl goes? Would you mind
| listing your packages and greping for libcurl entries.
The distribution works with proper dependencies. When R is built with
libcurl, the R package already depends on libcurl:
edd at max:~$ dpkg -s r-base-core | grep curl
Depends: zip, unzip, libpaper-utils, xdg-utils, libblas3
2008 Jan 15
1
Retrieve results from chisq.test programmatically
Hello,
I would like to run a series of chisq.test() and store results (x-square,
df, p-value) in a matrix for further analysis, but don't know how to do
such. Currently I run the command line for each set of data at a time and
it is time consuming.
Thank you for your help.
--My Coyne
[[alternative HTML version deleted]]