Displaying 20 results from an estimated 1000 matches similar to: "How to do SQL queries outside of AR"
2005 Feb 06
5
Rails on FreeBSD or OSX
Hello everyone-
I was just reading the article on Rails at O''Reilly and one of those
little light bulbs over my head went off - what a GREAT tool.
I tried to install both Ruby on my Mac PowerBook without much luck and
then tried to install Ruby and Rails on a FreeBSD server I have. I am
running into some odd errors - so, my question is - can you point me to
some tech resources
2005 Mar 17
4
Specifying Which Environment I Am In
After I have uploaded my app where do I specify that my app should now
use production environment settings and not development?
Can that be done dynamically so that I don''t have to reset a value once
I upload website?
Thanks for your help!
2005 Mar 10
4
:anchor won''t work in 0.10.1
Anyone else having problems with :anchor? Until 0.10.0 it was working
fine but with this recent update it''s just not doing anything.
Thanks,
Pedro
2005 Mar 01
2
@request cycle variables
I posted something about this yesterday, and got some good responses but
it seems that the variable @request[''controller''] isn''t being passed in
to the page or isn''t being read. Has the naming convention for these
variables changed. it worked great in all rails versions up to 0.9.5
with fcgi, but is not working in rails 0.10.0 with fcgi. I am currently
just
2005 Mar 09
10
Confused about extending the login generator ''user''
I''ve been using the login generator ''out of the box'' for simple
authentication, and its been working fine.
Now I want to extend it by simply adding ''type_id'' field which links to
my ''user_types'' table, but I''m hitting:
#<ActionController::SessionRestoreError: Session contained objects where
the class definition
2005 Apr 24
4
Typo 2.0
I''m proud to announce the 2.0 release of the typo web logging engine.
What started as a toy project while
I was waiting for a client at starbucks now became a prestige open
source project with tons of modern features a dedicated dev team and
even its own hosting service!
Get it at http://rubyforge.org/projects/typo/
The 2.0 release has been long coming. Here are some of the new
2005 Mar 05
3
login generator problem
I am trying to use the login generator, but I keep
getting the following error when I run "generate login
Account":
/usr/lib/ruby/gems/1.8/gems/rails-0.10.0/lib/rails_generator/base.rb:84:in
`manifest'': No manifest for ''login'' generator.
(NotImplementedError)
from (eval):3:in `__send__''
from (eval):3:in `manifest''
from
2005 May 17
8
acts_as_tree elegant tree printing
Hi,
I''m working with acts_as_tree to print an unordered list of items:
Root
-- Child
---- Child
I''ve got this working, however I''d like to know if there is a more
elegant fashion that I''m unaware of:
#Takes a parent category and recursivley returns all children
def find_all_subcategories(category)
if category.children.size > 0
2005 Mar 09
1
Re: Tons of shiny new stuff (Tobias Luetke)
Tobias, I would have left a comment on your blog, a thanks really, except
that the comment submit form is throwing an error. So, thanks for the cool
tools, especially the login generator. After deleting the old generator the
new one worked and passed all tests in a snap. Like Tim Lucas said, the
Hieraki code base is a wonderful resource for someone learning Rails. Much
appreciated.
2005 May 03
8
SQLite3 + RAM drive => 3 times faster unit tests
One problem I sort of always had with the ActiveRecord''s tight coupling
to the SQL backend is how slow it makes the unit tests. OK, there are
some ways to make it faster at a price of extra complexity (reusing the
fixtures, doing a rollback in the end of the test, etc), but still - it
is much slower than what I would like a unit test to be.
Today I had a very simple idea (why, oh why
2005 Mar 08
3
Chapter Numbering in Hieraki
I''m using Hieraki to do some documentation for RubyGems. So far I''m
lovin'' it.
But I have a question. I currently have three books on the site. It
seems that the chapter numbers continue from one book to the next. For
example, the first book has 7 chapters (numbered 1-7). The second book
has three chapters, but they are numbered (8-10) rather than the (1-3) I
2005 Mar 25
2
Rails PDF Documentation
hi,
i''m falling in love with rails, but the main obstacle is digesting the huge
amount of documetation for it... i''m getting dizzy flipping back and forth
between my development and the online reference.
i know rails is in a constant state of flux, but surely there is a pdf-ized
version of the api reference out there somewhere. alas, google tells me there
is no such animal.
2005 Mar 14
1
(newbie) /tmp/fcgi_ipc ?
I am running Rails on my Mac, installed from fink/gems. I get this
error when I try to re/start Apache:
FastCgiIpcDir /tmp/fcgi_ipc: access for server (uid -1, gid -1) failed:
read not allowed
If I chmod the /tmp/fcgi_ipc directory, apache starts and everything''s
fine.
Why is fcgi_ipc in my /tmp directory? Can anyone guess why the
chmod''ing doesn''t seem to
2005 Mar 24
3
Caching computation in rails?
Caching computation in rails?
Simple example: factorial modulus a large number
input: integer x
output: factorial( x ) % 12345678901234567
I want it so that if it computes factorial of N once, it will not have
to compute for N again.
code:
class SiteController < ApplicationController
caches_action :factorial, :inv
def examine
@inv = @params[''inv'']
@outv =
2005 Mar 26
2
Problem with GEM
I try the following command:
gem cleanup
and I get this:
C:\Ruby\bin>"c:\Ruby\bin\ruby.exe" "c:\Ruby\bin\gem" cleanup
ERROR: While executing gem ... (RuntimeError)
Unknown command cleanup
Even if I try:
gem cleanup rails
I get the same thing.
Anyone know what I am doing wrong?
Thanks,
Chad
2005 Mar 07
2
Threaded logging?
Is the logging system thread-safe? I have a process that takes about 5
hours, and twice, it has stopped, giving me no errors at all... but the
process hasnt been finished... The second time, I loaded the status
page, and it gave me a 500 error, at the same time the process stopped.
I have a sneaking suspicion that the cause is two processes trying to
write to the log-file at the same
2005 Mar 04
24
Rails speed?
Hi --
(First time posting to the list...)
I''m trying out Rails on my Mac (OS X Panther, 1.6 G5). It seems...
kinda slow? I''ve even run it with FastCGI and the response time is
still painfully slow.
Is this just me? Is mod_ruby any better than FastCGI? Or is it rails?
Thanks in advance!
-- joshua
2005 Mar 09
7
Getting started with contributing to Rails
Hi,
If I wanted to help contribute to the development on Rails (with
software, not money :-), what would be a good starting point? More
unit tests? Documentation?
Thanks,
Joe
2005 Mar 10
6
images from database + caching
Is the information in
http://wiki.rubyonrails.com/rails/show/HowtoUploadFiles on caching
images still the best way on how to cache images that are served from
the database?
I haven''t added time information to my image table yet, and the images
are sent after every single page view (even if it''s been downloaded
already).
Joe
2005 Mar 10
8
Login controller additions
I have added roles and roles_users table and updated the model so that
my users can have multiple roles.
("Admin" role does always have id = 1).
I have added these methods to my application controller.
<code>
helper_method :is_admin?
helper_method :is_user?
def is_admin?
if @session[''user'']
@session[''user''].roles.find(1)