Displaying 20 results from an estimated 2000 matches similar to: "error log for views?"
2006 Jul 08
1
conditional table association?
I''m using a db to log two types of events, link events and tag
events. At first I had two tables, link_events & tag_events, but this
seemed not very DRY because the only column that was different
between them was link_id and tag_id respectively. So I made these
tables:
events:
id int
user_id int
objtype_id int (holds ''1'' or ''2'' depending
2006 Jun 28
2
hash value won''t increment with =+ operator
I have a database of bookmarks and tags, and want to count the number
of bookmarks each tag is assigned to, for example: user "tyler" has
the tag "concerts" on 15 out of his 30 bookmarks. This code:
hash = Hash.new("0"); @user.tags.each do |t|
@user.bookmarks.each do |b|
x = 0
if b.tags.include?(t) then
hash[b.id] =+ 1
puts "hash is #{hash}
2008 Sep 16
8
rspec, Rails 2.1.0, rubygems, Mac OS X Leopard - rubygems does not recognize latest version
I''m trying to run some specs on my Mac OS/Leopard machine (10.5.5) but
rubygems won''t allow it:
$ spec spec/models/my_spec.rb
Rails requires RubyGems >= 0.9.4 (you have 0.9.3). Please `gem update
--system` and try again.
...but I already have the latest & greatest installed:
$ gem search --local rubygem
*** LOCAL GEMS ***
rubygems-update (1.2.0, 0.9.5)
Tue Sep 16
2007 Jan 11
0
writing tests for rescue_action_in_public
I''m having trouble with rescue_action_in_public, both in getting it
to work right in my rails app, and in writing tests to make sure.
What I ultimately want to do is test for what a normal user would see
when an error is trapped.
I override local_request? like so:
application.rb
--------------
def rescue_action_in_public(exception)
render :text => "oops"
end
def
2006 Oct 17
3
rake -T is missing rake db:fixtures:dump?
Subject says it all: rake doesn''t know about db:fixtures:dump. When I
try, I get this:
Don''t know how to build task ''db:fixtures:dump''
I thought this was a standard feature that ships with rake- any idea
why it''s missing, and how I can reinstall it?
Here''s the environment:
Ruby version 1.8.4 (powerpc-darwin8.6.0)
RubyGems
2006 Sep 24
8
form_for and Multiple Models Being Saved
Howdy Folks,
I want to use form_for to allow a user to submit a form that contains two
instances of the same model. They are entering calendar dates and I want
them to be able to submit 2 from the same form.
Ok, so, using form_for, what is the best way to do this? form_for seems to
be setup to handle a single instance in that it wants a name for the
variable, etc...
Has someone else done this?
2006 Jun 22
3
create pie chart
Hi,
I want to be able create a pie chart using rails, does anyone know of
any plugin''s taht could help me here?
Scott
--
Posted via http://www.ruby-forum.com/.
2006 Jun 22
2
id column for join table... kosher?
I''ve got two tables, bookmarks & tags. Using a
has_and_belongs_to_many association, I can do lookups using a join
table called bookmarks_tags. Two questions:
1. Can I have a migration for my join tables? Rails seems to "know"
about join tables implicitly from the associations, but if I do a
rake migrate the join tables won''t be built. I''ve been
2006 Sep 06
22
ROR host: dreamhost or godaddy?
hi all,
i am looking for a host for my ROR web app. the target audience will be
70% from mainland china, and 30% from the rest of the world.
i dont want a chinese hosst because:
1. it''s very slow for the rest of the world to access to it.
2. the speed is quite ok for china to access the us sites.
both dreamhost and godaddy provide similar budget plans, and i saw them
all from this
2007 Jun 15
1
mongrel cluster issues, plain old mongrel OK
I just created a test rails app, and am having very wierd issues with
mongrel cluster. Here''s what I''m doing:
rails test
sudo chown -R mongrel:mongrel test
cd test
sudo mongrel_rails \
cluster::configure -e production \
-p 8000 -N 3 -a 127.0.0.1 --user mongrel \
--group mongrel
It correctly writes the mongrel_cluster.yml file to the config
directory. Now,
2020 Aug 04
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
On Mon, 3 Aug 2020, Todd Benivegna wrote:
> Thank you! Sorry for another bonehead question…. Do I replace <myups> with
> the IP address of the NUT Server/Synology? I’m assuming I would use this
> version for use in Dash with Ubuntu, correct?
Yes, you replace <myups> with the address of your UPS, for example
"ups at 192.168.x.y". Are you using Dash or Bash?
2008 Aug 30
1
rails 2.1.0 doesn't find my rails app
I''m upgrading from rails 1.2.3 to 2.1.0. I got all my 1.2.3 tests to
pass in 2.1.0 with no deprecation warnings, renamed my views, replaced
all the config files with a fresh "rails --force /path/to/app" and
fired up mongrel. Problem is when I visit the homepage of my app,
rails serves that default page that says "Ruby on Rails: Welcome
Aboard". It acts like
2004 Jul 11
1
Shorewall 2.0.5 reports version as 2.0.4
This morning I discovered a problem in the build of 2.0.5 -- the version
number in the install.sh, uninstall.sh and fallback.sh script were not
updated properly. The result is that "shorewall version" returns "2.0.4"
rather than "2.0.5". This problem is present in the .tgz and .rpm files.
I''ve replaced the original .tgz and .rpm files with corrected
2008 Nov 06
3
Help recovering zfs filesystem
Let me preface this by admitting that I''m a bonehead.
I had a mirrored a zfs filesystem. I needed to use one of the mirrors temporarily so I did a zpool detach to remove the member (call it disk1) leaving disk0 in the pool. However, after the detach I mistakenly wiped disk0.
So here is the question. I haven''t touched disk1 yet so the data is hopefully still there. Is there
2003 Feb 05
1
Win 2000 & XP Printer problem RESOLUTION
In case anyone was interested... this turned out to be a Super
BONEHEAD problem....
My printer name was "testron".
Well... come to find out, I have a share with the same name.
Imagine that.
Just an FYI to those new to samba... can't have printer & share names
the same.
========================
I've recently started adding WinXP (and 2000) clients to my network.
2006 Jul 30
1
Printer settings don't stick
Experienced programmer, Samba noob, CUPS noob; trying to use Ubuntu
6.06 Server as a print server for Windows XP clients on a home LAN.
Worked through the Howto and got point-and-print to work for my Canon
iP1200 (raw CUPS queue, and I used the Windows XP Add Printer Wizard
to upload the driver to the print$ share).
However, I can't persuade the printer driver to change the ink
cartridge mode
2007 Oct 21
13
[ANN/RFC] Rathole, a fixtures extension plugin
Like lots of other folks, I''ve been searching for a way to scratch my
fixture itches. Rathole is my extraction of a few techniques we''ve
successfully applied at my day job.
We''ve been using Rathole for a month or so now, but I''d really like
some feedback from a wider audience. Rathole tackles:
* Conflicting PK''s (no more id''s in fixture
2007 Jan 02
2
link_to method throws a url_for error
This error seems pretty bizarre. I''m using ActionMailer and am using
a template in app/views/welcome_mailer/join.rhtml which has this line:
<%= link_to :controller => ''group'', :action => ''join'', :group =>
@group.id, :ic => @code.code %>
The error is: undefined method `url_for'' for #<WelcomeMailer:
0x2aaaad4fb470>
2020 Aug 03
2
Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
On Sun, 2 Aug 2020, Todd Benivegna wrote:
> How would you write the SHUTDOWNCMD line with multiple commands? I’ve been
> looking at the manual and see that you have to escape the internal “ but am
> still a little confused on how to do this exactly.
This assumes that you use the Bash shell in your default environment. It will
need adaption if you use Dash.
In .bashrc define
2012 Feb 17
1
building r-devel
I'm sure I'm being an absolute bonehead (again), but can someone
suggest what I might be doing wrong?
Trying to build latest r-devel on Ubuntu 10.04; as recommended in
various places, trying to build it in a separate build directory (since
starting to compose this e-mail I've found that it works if I build in
the original source directory [as disrecommended], so this has become a