Displaying 20 results from an estimated 900 matches similar to: "Help with best approach(fairly easy question)"
2008 Oct 08
1
Memory leak problem
I have a txt file with some data that i need to import to de database.
I''m using ruby to import those data but i have a major problem, when i
''ve
a large amount of data i run out of memory.
File.open("#{RAILS_ROOT}/public/files/Neighborsville.TXT").each() do
|line|
@stringArray = line.split("|")
@i += 1
puts @i
@pid =
2006 Jul 04
8
writing to many_to_many table
I have three tables. users, posts, users_posts. This last one is to
mark a post as read.
How do I write to the users_post table?
Here''s what I have:
In model ''User_Post''
belongs_to :post
belongs_to :user
In post/view/show:
<%= link_to "Mark As Read", :controller => ''post'', :action =>
''post_read'',
:user =>
2008 Nov 03
3
Ruby and/or Rails Community in Argentina
Hola a Todos,
¿Hay alguna comunidad de usuarios Ruby/Rails en Argentina, de la que
ustedes sepan?
Hello All,
Is there any Ruby/Rails community in Argentina, that you know/heard of?
Thanks in advance,
--
Rodrigo Fuentealba
http://www.thecodekeeper.net/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
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
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
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
2006 Mar 15
5
acts_as_threaded - help ???
Hi, has anyone successfully used the acts_as_threaded plugin with
postgresql?
I''m using rails 1.0 and ruby 1.8.4 on linux.
Following the screencast on
http://www.railtie.net/articles/2006/02/05/rails-acts_as_threaded-plugin ,
I got to where we''re ready to create our first post, having made the
changes to controllers/posts_controller.rb, views/posts/_form.rhtml,
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,
2008 Sep 23
1
Dynamic Select Box
I have two select boxes and I update the content of second box on the basis
of selection made on first with AJAX. I was wondering if any one can point
to related tutorial.
--
Thanks,
Jaikishan
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2008 Sep 19
3
create Graphical charts using rails
Hi
Could anybody please point me to some good links to draw Graphical
charts using RubyOnRails and also suggest which is the best one?
Thanks in advance
Sijo
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group,
2008 Sep 17
0
Problem with url_for and namespaces (in in_place_editing)
Hello,
Well I have been working with the in_place_editing plugin and have
been running into the following error:
Unknown action
No action responded to 1
My code on my view is below:
<span id = "permission"><%= @permission.name %></span>
<%= in_place_editor "permission", {:url => url_for(:action =>
"update", :id => @permission.id) }
2010 Jul 28
1
Problem loading YAML files and using pluralize method in Rails3rc
Hi,
I just upgraded my rails app from rails3.0.0beta4 to rails3.0.0rc and
I''m having problems loading a yaml file. I have a load_config.rb in
the initializers folder which loads a yaml file. The basic loading
code is:
FACEBOOK_CONFIG = YAML.load_file(File.join(Rails.root, ''config'',
''facebooker.yml''))[RAILS_ENV]
This stopped working when I moved to
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
2010 Jul 25
0
You can't set a constant with namespace in the initializers?
Help! in my rails controllers, there is a ''Admin'' namespace. (My the
structure of the controllers dir is like this :
app/controllers:
home_controller.rb
...
admin/posts_controller.rb
admin/pages_controller.rb
The ''Admin'' will automatically become a Module constant (I know it
from the console: ''puts Admin => Module'');
And in my
2012 Mar 26
1
Models in sub-folders in Rails 3
I have a Rails 2 project in which models are in sub-folders, but not in
a name space
app/models/sub_folder/posts.rb
class Post < ActiveRecord::Base
end
The controllers are also in sub-folders, but are name spaced (views also
in a corresponding sub_folder).
app/controllers/sub_folder/posts_controller.rb
class SubFolder::PostsController < ApplicationController
end
This works fine, but I
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 Jun 28
2
models @ data extraction
I''m building my first webapp...
I have db tables "users" and "posts". Model for user is "has_many
:posts". Model for post is "belongs_to :user"
In a slightly modified scaffold I can list all the posts and which user
wrote them (/post/list), but want to link the username to a list of
posts by that user.
How do I accomplish that?
Sorry for the
2005 Mar 13
1
Fairly mysterious rsync problem.
I am having trouble sending a file with rsync to a
local machine.
I try from 192.168.0.8:
rsync -vvv --stats --progress file1
192.168.0.14::test-data
and get:
make_file(3,TEST2)
send_file_list done
send_files starting
send_files phase=1
send files finished
total: matches=0 tag_hits=0 false_alarms=0 data=0
Number of files: 1
Number of files transferred: 0
Total file size: 9 bytes
Total
2008 Dec 10
1
Any recommendations for a fairly working version of Thusnelda
Hi All,
I know the Thusnelda is suposed to be experimental and its not
complete yet but I was interested in trying it out. I see there is an
experimental windows version of ffmpeg2therora that uses the Thusnelda
encoder, I am attempting to build a Linux version. Presumably the
experimental ffmpeg2theora must work to some extent or they wouldn't
both offering it for download.
I was wondering
1998 Mar 07
0
fairly trivial bug in box(): 0.61.1
box() doesn't appear to do anything with the "col=" parameter (it does
use "lwd=" correctly).
I may fix this if I get around to it, for now I'll probably hack
PostScript.
(Thanks, everyone, for all the work on R: I look forward to the spiffy
graphics once the "new and interesting bugs" are somewhat tamed ...)
Benjamin Bolker Dep't of Ecology