Displaying 20 results from an estimated 100 matches similar to: "scripts/create_db"
2005 Dec 19
1
Is there a guide for using ERBSQL?
I''m not sure I completely understand the benefits of using ERBSQL or
how to use it. Google searches have proved it to be rather
undocumented.
From what I understand the embedded ruby sql allows you to write sql
that''s easier to deploy via the create_db script and also more
portable to postgres, myslq, or whatever.
But what I can''t find is a resource that
2006 Mar 02
5
Instiki and SQL Server??
Hello. I reeeeally want to get Instiki running at my day job, but they
are Microsoft-heads. While I can probably sell them on trying Rails,
they are definitely going to want the database to sit in our SQL Server
instance with our other databases. I can''t get instiki to create the
tables in sql server though (I''ve added ADO.rb, and gotten a
connection). When I run the
2006 Mar 02
2
Unit tests, salted hash login
Hello,
I am having some trouble running the unit tests for the salted has login
generator. I am a bit new to both ruby and rails so I am having a little
trouble deciphering the error message I get when running ''rake
test_units''. Up till the point where I try to run the unit tests I have
followed the quick start guide for the salted hash login generator
2006 Apr 20
2
Salted Login Generator glitch
I followed the tutorial here
http://wiki.rubyonrails.com/rails/pages/SaltedLoginGeneratorQuickstart
and didn''t have any problems. Actionmailer is working fine. When I
sign up I get the email saying "Please click on the following link to
confirm your registration"
When I do i go to the default page with "Welcome. You are now logged
into the system..."
So I thought
2007 Nov 09
3
Major problem with a new ZFS setup
We recently installed a 24 disk SATA array with an LSI controller attached
to a box running Solaris X86 10 Release 4. The drives were set up in one
big pool with raidz, and it worked great for about a month. On the 4th, we
had the system kernel panic and crash, and it''s now behaving very badly.
Here''s what diagnostic data I''ve been able to collect so far:
In the
2007 Oct 02
2
Requires from other modules / requires with aliases
Hi everyone, I''ve been working on a module for bacula, and I''m having
a problem requiring resources I''ve defined in other modules. At the
moment, I have the following (simplified):
/etc/puppet/modules/bacula/manifests/init.pp:
class bacula {
...
define configure ( $gui="true", $db_password ) {
...
postgresql::create_db {
2005 Mar 29
0
ActionMailer tmail/quoting.rb problem
Hi,
Why did you allow this incompatibility? ;)
* fixtures/notifications/signup:
_foo
@expected.body = read_fixture(''signup'')
p @expected.body
#=> " foo\n"
# because text.gsub(/_/," ")
If you enhance TMail::Mail#body like this,
I want you to convert mail.body code in render_body.
My mailer code now:
# topic is a ActiveRecord instance. topic
2006 Jun 20
3
WEBrick just decided to take a hiatus on me
Good day all.
This is one of the most frustrating days I have had with Rails in quite some
time now (almost 8 months actually).
Yesterday I complete my development and testing and everything is peachy.
I head home for the evening and do my things there.
This morning, I come back in and do my typical morning routine of starting
up eclipse and the usual "ruby script/server" command in
2008 Jan 13
2
module_eval and scope question
When trying to understand a piece of code from the Ruby-On-Rails
framework,
I found that I''m still lacking knowledge about scope issues in Ruby.
Here is a
stripped down version of the code I''m trying to understand (in case
you
happen to use Rails: This is from file scaffolding.rb):
module ActionController
module Scaffolding
..
module ClassMethods
def
2012 Sep 11
1
define_method vs module_eval
Rails code:
Accessors.send :define_method, :"default_#{name}", &block
Accessors.module_eval <<-METHOD, __FILE__, __LINE__ + 1
def #{name}
-ISKimRw02aC5oVgD8gxYQQ@public.gmane.org(:#{name}, [])
end
def #{name}=(value)
value = value.present? ? Array(value) : default_#{name}
_set_detail(:#{name}, value) if value != @details[:#{name}]
end
2006 Mar 13
1
adding custom cache field
Hello,
I needed to add custom cache field for one of my application. I thought I
will share the code showing how to do this.
This code below creates and maintain a custom cache field, for keeping track
of totals. Say, you have accounts, and for each account there are transactions
(either deposit/withdrawal), and one will like to keep track of the total
balance for an account.
So, let there be a
2006 Jul 22
1
How to debug this
Hello,I get this message and I don''t know how to interprete this.I think it has to do with plural tables and singular referencesThanks for any help!Jim======================================================================================uninitialized constant SubjectRAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
2006 Jan 09
1
Cooky Cookies
Hi All,
I have a problem with the stemming(?) in rails. I have a table cookie and a
Cookie model which I have generated a scaffold for. The problem is that
rails starts looking for a file that it calls "cooky.rb", this must be some
kind of misunderstanding between me and rails, but how do I correct it?
Other scaffolds work just fine.
/Hugo
NameError in Cookie#index
uninitialized
2006 Jul 26
1
Scaffolding Problems
Hi.. Im a brand new ruby on rails developer, and when i make a scaffold
and navigate to the it, i get an error that looks like this.
-----------------------------------------------------------------
NameError in PagesController#list
uninitialized constant Page
RAILS_ROOT: ./script/../config/..
Application Trace | Framework Trace | Full Trace
2006 Jan 10
1
Cooky cookies causes trouble
Hi All,
Yesterday wrote about my troubles with naming a table and model cookies and
cookie respectively. I know that everybody hates the newbie screaming bug as
soon as he encounters behaviour he doesn''t understand. But I''ve reproduced
the error in the simplest application possible, and dare therefore say that
this quite possible could be a bug in Rails.
Database:
CREATE TABLE
2006 Jun 14
5
uninitialized constant error after scaffold on new Windows XP environment
I am attempting to get a working Rails programming environment setup working
under XP with MySQL, RadRails and Webrick. I have been using my PowerBook
but need to working on Windows environment too.
I have basic functions of Ruby and Rails going. I created a really simple
table and generated the scaffolding. The server starts just fine. I can
browse the database succesfully in RadRails. The issue
2008 Mar 16
0
bypassing verify_authenticity_token before_filter when in facebook
Hi list,
Not sure if this is helpful for anyone but I am working on a Facebook
project where I need bypass the new CSRF protection (built into Rails
2.0) under certain conditions. However, since my project works
outside of Facebook I don?t want to disable the CSRF protection from
requests made outside of Facebook.
Here is a small extension i wrote for the ForgeryProtection module.
2005 Dec 21
1
Table called applications - causes stack overflow?
Having worked through Four Days on Rails and the book Agile Web Development
with Rails I decided it was time to start a live project. I have an existing
application with MySQL database, so I modified the schema to use Rails
standard column names. The main table was named ''applications''.
ruby script/generate scaffold Application Admin results a stack overflow
2012 Jan 15
1
NoMethodError: undefined method `expect'
Ideas?
ruby-1.9.2-p290 :002 > require ''rspec''
=> true
ruby-1.9.2-p290 :003 > RSpec::Version::STRING
=> "2.8.0"
ruby-1.9.2-p290 :004 > describe ''division by zero'' do
ruby-1.9.2-p290 :005 > expect { 2/0 }.to raise_error
ruby-1.9.2-p290 :006?> end
NoMethodError: undefined method `expect'' for
2005 Aug 16
1
Defining model classes for enumerations
I have several tables for enumerations. They all have the same content:
id, name, position. I''d like to avoid the tedious work of defining a
class for each one explicitly. Not least, in order to avoid clutter in
the model directory.
Here''s what I''ve come up with:
class EnumRecord < ActiveRecord::Base
def self.define_enums(*enums)
enums.each do |spec|