Displaying 20 results from an estimated 5000 matches similar to: "File system case translation"
2006 Jan 05
4
testing file uploads
Hi all,
I was wondering about the class used when rails receives file uploads.
Sometimes it appears to be a File, and other times it is a StringIO.
Also it has methods such as original_filename that don''t appear to
belong to either of these classes. I ask because I''m trying to work out
how to test my fil upload related models and controllers.
Is there some standardised way of
2007 Apr 05
5
Odd error handling in ActionView#compile_template causes WSOD
If a view file cannot be compiled (eg it has a block with a missing
''end'' statement), I''m experiencing WSODs - the browser reports a lost
network connection, rather than the helpful compilation error that we
used to have.
When the compilation fails, ActionView#compile_template raises this
error :
TemplateError.new(find_base_path_for(file_name || template), file_name
||
2015 Oct 01
1
doveadm + ldap userdb
Hi!
OS: CentOS Linux release 7.1.1503 (Core)
Dovecot: 2.2.18
Run user listing - doveadm user '*', single user - work.
auth[20540]: segfault at 8 ip 00007fd554340c6b sp 00007ffc17c886e0 error 
4 in libauthdb_ldap.so[7fd55433b000+a000]
dovecot: auth: Fatal: master: service(auth): child 20540 killed with 
signal 11 (core dumped)
dovecot: auth: Error: net_connect_unix(auth-worker) failed:
2006 May 23
6
How to list all models of an application?!?
How can I get a list of all model classes in the domain of a Rails
application (all models, both in "app/models" and in
components/somedir/model.rb)?
Thanx in advance for your precious help!
Edoardo "Dado" Marcora
2007 Dec 30
6
Restful-Authentication Rspec Failure Rails 2.0.2
I am trying the Restful-Authentication (latest version, downloaded
today) and upon running the generator, doing the migration, prepping
the test system and putting the resources in routes.rb I get a Rspec
test failure:
''SessionsController logins and redirects'' FAILED
expected not nil, got nil
routes.rb has:
 map.resources :users
 map.resources :sessions
nothing else was
2006 Feb 21
5
how to include an html file?
I have a bunch of html files with partial page content. I''d like to be 
able to include the content of these files in my RoR views without 
having to change or rename them.
In PHP I''d simply use
  include("file.html");
What is the RoR equivalent of this? render_file insists on it being an 
rhtml template, and render_partial requires me to rename the file.
Ideally, I
2010 Aug 08
2
paperclip save to disk and s3
I have a standard Paperclip setup that saves a file to my disk.  In
addition I would also like the file saved to my amazon s3 bucket.
[code]
after_save :copy_to_s3
  def copy_to_s3
   has_attached_file :photo,
   :storage => :s3,
   :s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
   :styles => {
   :thumb => "100x100#",
   :small => "750x750>"
2006 Apr 10
3
autocomplete 2nd field based on 1st field''s input
I''m trying to populate a field named "file_name" based on the input of a 
field named "title". So, for instance, based on the following input in 
the "title" field:
My Title Is Awesome
I would want the following "file_name" to be autocompeted on the fly:
My_Title_Is_Awesome
I''ve been going over all the autocomplete examples out there,
2005 Feb 08
2
test_process.rb => LoadError
Line 4 and following of test_process.rb reads:
if defined?(RAILS_ROOT)
  # Temporary hack for getting functional tests in Rails running under
1.8.2
  class Object #:nodoc:
    alias_method :require_without_load_path_reloading, :require
    def require(file_name)
      begin
        require_without_load_path_reloading(file_name)
      rescue Object => e
       
2006 Jan 19
4
UserEngine - rake bootstrap aborted => undefined method `synchronize_with_controllers'' for Permission:Class
Good day all.
I have successfully installed Engines and LoginEngine and LE is setup and
running correctly.
However, after installing and setting up UE, when attempting to run the rake
bootstrap method I get the following error:
undefined method `synchronize_with_controllers'' for Permission:Class
My environment is
Rails 1.0.0
Ruby 1.8.2
WinXP
WebBRICK
MySQL 4.1.14
I found the following
2006 Jun 20
2
Problem with "can''t dump anonymous class Class"
I submitted this earlier, but the web forums went down and I''ve screwed up
the thread, so I''m starting over.
I''m trying to built a document upload system.  The system has a main
Document model with different subclasses for different types of documents.
With the code below, if I attempt to create a Document, it works fine, but
if I attempt to use one of the subclasses, I
2009 Jan 28
2
Text data
i have a data column of text entries:
26M_AN_C.bmp
22M_AN_C.bmp
20M_HA_O.bmp
20M_AN_C.bmp
26M_HA_O.bmp
22M_HA_O.bmp
31M_AN_C.bmp
38M_HA_O.bmp
.
.
.
.
And I would like to sort by the middle tag: AN, HA, etc.
Is there a way to parse text data in R? 
In excel, I would have used the "left" and "right" function to cut out just
the middle two letters out and put into another
2007 Aug 08
12
Some more win32-changenotify analysis
Hi all,
I decided to check the responsiveness of the pure Ruby vs C extension 
versions of win32-changenotify. I setup this little file generator program:
a = []
10.times{ |n|
    a << Thread.new{
       File.open("File_#{n}", ''w''){ |fh| fh.puts "test #{n}" }
    }
}
a.each{ |t| t.join }
The pure Ruby version did not do so well. In some cases it
2024 Apr 08
4
Exceptional slowness with read.csv
Greetings,
I have a csv file of 76 fields and about 4 million records. I know that 
some of the records have errors - unmatched quotes, specifically.? 
Reading the file with readLines and parsing the lines with read.csv(text 
= ...) is really slow. I know that the first 2459465 records are good. 
So I try this:
 > startTime <- Sys.time()
 > first_records <- read.csv(file_name, nrows
2005 Dec 17
10
need some tips for applying patches
I am working with a legacy database that does not always follow the 
conventions for table names, primary key and foreign key column names, 
and join table names.
This is no problem in my application code because Rails allows me to 
override the defaults. However it is making unit testing next to 
impossible because fixtures will still try and insert data into the 
wrong tables.
Changing the
2012 Sep 26
1
Ask for help - how to change WHIRR.117.csv to WHIRR_117.csv
Hi,
I have a script below.
dat <- read.table(file="pt.csv", header=T, sep=",", row.names=1,
col.names=1)
dat
for(which_col in seq_len(ncol(dat)))
{
      subset_data <- dat[,which_col:ncol(dat)]
      file_name <- sprintf('%s.csv', colnames(dat)[which_col])
      write.csv(subset_data, file_name)
      message(sprintf('Saving %s', file_name))
}
2008 Mar 20
1
How to get device name with device id?
Hi all,
I want to open a device(/dev/sda1, /dev/hda2 etc) in which my file exists.
I've used 'stat' system call to get the device id.
But now I want the device name from this id(st_dev).
How to get that one?
Or 
Do you have any other method to know the device name where my file resides?
Thanks 
      Bollywood, fun, friendship, sports and more. You name it, we have it on
2007 Aug 18
1
problem with file_column url generator
Hi,
I have the following in a viewer
Here, @lst = Homework.find(:all)  is an array of homeworks. I checked
this this is correct.
Based on the error below, somehow, the url_for_file_colum does not
like to act on the model element.
I checked the source code to url_for_file_column, and the problem is
with instance_variable_get().
I have no idea wat is going on!  Any help is appreciated.   Gordon.
2006 Dec 08
2
trouble with cloud output to bmp when in loop
I have some data that I need to view in various 3-D clouds.  To better see
the cloud structure on a 2-D screen I would like to output a bunch of bmp
files with clouds at slightly different angles, then run them through an
external program to animate them.  But I'm having trouble getting cloud()
from the lattice package to output to bmp files.  Oddly, this is only a
problem when outputting
2006 May 01
2
how to reference a file for download
I have an app that uploads files into the directory RAILS_ROOT/documents/
I tried to access the file for downloading using <a
href="#{RAILS_ROOT}/documents/file_name">my file</a>.
Rails prepends the controller name to the link so I get
<a href="
http://localhost:3000/tasks/show_document/config/.../documents/file_name"
What''s the right way to do this?