Displaying 20 results from an estimated 9000 matches similar to: "Models in sub-folders in Rails 3"
2023 Jul 26
1
Downloading a directory of text files into R
?s 23:06 de 25/07/2023, Bob Green escreveu:
> Hello,
>
> I am seeking advice as to how I can download the 833 files from this
> site:"http://home.brisnet.org.au/~bgreen/Data/"
>
> I want to be able to download them to perform a textual analysis.
>
> If the 833 files, which are in a Directory with two subfolders were on
> my computer I could read them
2012 Oct 21
1
load_missing_constant
I have a model ''site'' defined in a sub-folder ''cms''
class Cms::Site < ActiveRecord::Base
.....
the model is loaded correctly , checked in console:
application.rb
config.autoload_paths += Dir["#{config.root}/app/models/**/"]
console
>Cms::Site.all => []
Now trying to access this model from a sites_controller ( in
backoffice/cms
2013 Jan 12
1
showing posts in blog
When I make a new post in my blog, it returns this when I try to view my
current posts:
---------------------------------------------------------------------------
ActiveModel::MassAssignmentSecurity::Error in PostsController#create
Can''t mass-assign protected attributes: text
Rails.root: C:/Users/Josh Koloff/Desktop/Programming Stuff/Rails
Stuff/blog
Application Trace | Framework
2012 May 23
1
received unexpected message :id= with (20)
Please help me to understand this error message:
1) PostsController#create when logged in should create a new post and
redirect to a successful message page
Failure/Error: post ''create'', { post: {title: ''New post'',
Mock Post(id: integer, title: string, description: text,
location: string, created_at: datetime, updated_at: datetime, status:
string,
2006 Aug 07
0
deployment failures with sqlite3
Hello list,
I''m attempting to deploy my first rails app on textdrive and have run
into a problem. I currently have lighttpd running and I am able to
start my rails app. When I attempt to visit my site I get an:
Application Error (Rails)
Investigating my production.log it looks like the app isn''t finding
sqlite3, right? Do I need to pack that with the app? What about non
2011 Dec 02
2
problem setting expectation for test with delayed::job
I''ve got something like this:
# post_observer.rb
after_create
# ...stuff
Delayed::Job.enqueue(PostSharer.new(post, post.user))
end
...
# post_sharer.rb
class PostSharer < Struct.new(:post, user)
def perform
# Delayed::Job calls .perform on the object passed into enqueue
end
end
# post_controller_spec.rb
it "shares the post" do
2011 Mar 09
1
problems with public (sub)folders
Hi,
i am trying to share a maildir++ mailbox to other users but i can only subscribe to the root directory. The subfolders of the public mailbox do not appear in the exported list.
Does anyone has an idea how i can share the subfolders too without creating symlinks for every single folder?
Best,
Frederik
>>>>> ls -lA /var/mail/public
.user01 -> /var/mail/user01/Maildir
2012 Apr 09
8
Rails Functional Testing Problem
I''m trying to run some functional tests on Rails. However I am coming up
with the following error.
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you
really wanted the id of nil, use object_id
app/controllers/posts_controller.rb:11:in `create''
posts_controller_test.rb:5:in `test_should_create''
Here is my test file
require
2006 Dec 10
5
model-controller-paradigm: What about admin controllers?
Hi all
We all know the model-controller-paradigm: I have a model "News" which
has a corresponding CRUD-controller "NewsController".
But now I''m quite unsure about the following...
Guess we have normal visitors that visit our site www.??.com/news and we
have administrators that create and modify news items.
The admin should see an "Edit" link and a
2006 Feb 14
1
How can I order_by a sub folder?
Hi there!
I have a folder model which can contain sub-folders. I want to save the
sub-folders in a variable ordered by the name of the subfolders:
folder = Folder.find(1)
sub_folders = folder.folders # ... how can I order the sub folders by name
here???
Thanks,
Mischa.
2006 Mar 04
4
Submitting data to two different tables with two different models
I''m very new to Rails. I''ve been reading Agile Web Dev for a while and read
up on ruby, but I''m still learning.
I designed a website for someone for an engineering shop. New projects had
to be added manually.
Well, I figured this would be a great canidate for railifying! I have the
form working perfectly, you can add your data and get it in a table, and
listing
2007 Mar 04
0
Syntax Error??
I wanted to make a ''simple blog'' refer to "Creating a weblog in 15
minutes" on rubyonrails.org
I made controller named post, and model named posts and started again
Webrick server
but , ther was a error like this ->
SyntaxError
app/controllers/posts_controller.rb:1: Invalid char `\357'' in
expression
app/controllers/posts_controller.rb:1: Invalid char
2011 Sep 09
1
How to get rid of sub-folders ?
Hello,
OK, no answers on my previous e-mail. I'll rephrase it.
How can I get rid of subfolders on a users' tree-like structure on dovecot ?
Which file must I "touch" ?
TIA,
s.
?
----
"I merely function as a channel that filters
music through the chaos of noise"
- Vangelis
2006 Aug 10
6
Migrations suddenly broken: undefined method autoload_paths
I really need some help here because I am at a loss. I have been using
migrations just fine now for a while and I suddenly started getting a
very bizarre error when migrations are run:
undefined method `autoload_paths='' for Dependencies:Module
I have tried rolling back my application code, and rolling back the
rails edge revision I am running but neither seem to help.
I have
2008 Sep 19
1
Help with best approach(fairly easy question)
Hello!
Well this is maybe a fairly easy question. I am writing an app where
users that belong to a group have their own blog where they can make
posts. I have a posts_controller with all the CRUD operations and my
index action shows all the posts from all the users on a group. The
route is:
users/1/posts
The thing is that I want to show too, all the posts from any user, or
all the posts for a
2007 Dec 22
8
Rails 2.0 rescue_from
I am trying to use the new Rails 2.0 macro : rescue_from
class PostsController < ApplicationController
rescue_from ActiveRecord::RecordNotFound, :with => :deny_access
...
def show
@post = Post.find_by_id(params[:id])
raise ActiveRecord::RecordNotFound if @post.nil? #illegal access
.....
end
def deny_access
respond_to do |format|
format.html
end
end
but the
2012 Jul 12
1
engines: accessing classes from the hosting-apps lib
I have an engine and can access model-classes of the hosting app without
any troubles.
But when I try to access classes that are defined in the lib-directory of
the hosting app, they are not found and I get a
uninitialized constant Redmine
where Redmine is a module defined in the lib-directory of the hosting app.
The lib-directory has added this dir to the autoload_paths, but the engine
2015 Mar 02
2
Weird sub-folder error
Hi,
I?m running dovecot 2.2.13 and I ran into a weird problem.
A user migrated his mailboxes by letting users copy them from their old server to the new one through their MUA. All that went fine except for one very weird instance. The user is running Outlook 2010.
The user has a sub-folder structure which dovecot places as dotted names beneath the Inbox. (E.g. Maildir/.my.sub.folders).
After
2012 Oct 24
0
Announce: Puppet Dashboard 1.2.13-rc1 Available
Puppet Dashboard 1.2.13-rc1 is a maintenance and bugfix release
candidate of Puppet Dashboard.
This release is available for download at:
https://downloads.puppetlabs.com/dashboard/puppet-dashboard-1.2.13-rc1.tar.gz
Debian packages are available at
https://apt.puppetlabs.com
RPM packages are available at
https://yum.puppetlabs.com
See the Verifying Puppet Download section at:
2005 May 09
4
Two folders !
Hello !!
I need to sync two folders in fedora linux.
One is at /ftp/test/test1
Second is at /ftp/test/test1/test3
I need to sync /ftp/test/test1/test3 that new files uploaded will be seen in /ftp/test/test1 every hour or a day .
How do i do that ?
Thank YOU ALL !
Tibor Vovcak
Slovenia
-------------- next part --------------
HTML attachment scrubbed and removed