Displaying 20 results from an estimated 2000 matches similar to: "using console is a proper way in produciton?"
2009 Jun 19
1
config.action_controller.session_store = :active_record_store
Hi All,
I am new to Rails and learning rails reading ebook ''Agile web
development using rails''. I am doing samples given in this book
chapter by chapter.
but I stuck when I come to Sessions chapter, they have given that to
enable session to be Database based the line
config.action_controller.session_store = :active_record_store is to be
uncommented from config/environment.rb
2009 Jun 02
1
406 Not Acceptable response
I want to send a response in a content type that is not listed in the
request Accept header. When I try to do this in Rails a response of
status code 406 Not Acceptable is sent. I would like to know how to do
this.
Ps: A example of a API that do this is the Sun Cloud API, where the
errors are sent in a specific media type (http://kenai.com/projects/
2009 Jun 18
2
How to persist file upload fields after a validation error.
Hi all,
Is there an easy way to not lose the file field input from the user
after a validation error? It pisses people off to have to choose
their files again just because some other field didn''t pass a
validation. I''ve googled this and just haven''t come up with much of
anything.
Thanks.
2009 Apr 13
4
Creating Methods in the Model?
Hey Everyone.
First day diving in to ROR and Ruby...
My question is how do you define methods with in the model class and/or
should I even be doing this?
It is my understanding that you should put as much of the business logic
into the model as possible. I want to do some data manipulation before
I things are submitted to the database
IE (Create a variable out of two submitted via form, as
2009 Jun 23
3
Starting ruby script on server's reboot
Hi
I''m using passenger + apache.
with this combination, how can I start my ruby script on server''s
reboot?
now I type "ruby myscript.rb run" whenever server reboot.
2009 Apr 25
5
SQLite3::SQLException: unable to open database file
Hi.
I was trying to code same as the rails guide : getting started.
I could follow steps to 6.3 Working with Posts in the Browser.
(setting home page, creating a resource, running a migration)
After clicked create button, errors are occured.
SQLite3::SQLException: unable to open database file: INSERT INTO
"posts" ("name", "created_at", "title",
2010 Dec 25
4
need help with data management
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/2010 missing
121212 11/10/2010 32
121212 11/11/2010 15
.................................
I want to order the rows by client ID and date and using a black-box
forecasting method create the data fcst(client,date of forecast, date
for which forecast applies).
Assume that I
2009 Apr 29
1
Driving me nuts!!! - Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I had to put a new HD in, and now I''m reinstalling everything, and
can''t get mysql to fully work. I can''t remember how I fixed it. I''ve
searched everywhere online and can''t find anything.
when I try to use the >mysql command I get this:
Can''t connect to local MySQL server through socket ''/tmp/
mysql.sock'' (2)
My first
2009 May 13
4
Setting flash notice via javascript?
I am using a javascript to redirect to another action. Is there a way
to set the flash [:notice] in the javascript?
So when the javascript redirects, the new action/view picks up the
flash[:notice]?
(I suspect I may have to do something like url?notice=.....)
ideas?
thanks.
2009 Apr 28
1
help active record modeling.
Hi.
I have difficulties to model active record.
So please help my trouble.
Let''s suppose there are nations which have castles at least 1,
and there are 3 types of castles.
So I will make these tables.
NationsTable,
CastlesTable have common attributes of 3 types of castle.
CastlesATable, CastlesBTable, CastlesCTable each have its unique
attributes.
In this case how can I represent
2009 Jan 23
3
Bug regarding ActiveRecord and TimeWithZone
I''ve discovered a strange behavior regarding ActiveRecord and
TimeWithZone
I''ve seen the error when using SQL Server, I have not yet tried with any
other database.
Here''s output from the console - "User" is a simple model made with a
migration.
-----------------------------------------
>> d1 = User.find(:first).created_at
=> Thu, 21 Jun 2001
2011 Sep 01
2
upsd problem with NUT 2.6.1
Hi,
I've had NUT 2.6.1 on OpenIndiana working with a Tripp-Lite
ECO550. I've been playing around with the config files a
little bit, and I must have done something that messed up
the demon. I now get
wiley$ pfexec /opt/nut/sbin/upsd -DD
Network UPS Tools upsd 2.6.1
0.000000 listening on 127.0.0.1 port 3493
0.000486 listening on ::1 port 3493
0.001279 Can't connect to
2009 Apr 09
4
create_table with unique combo
I need to create a table replacing default integer id with a string id
and making a combo of (id and version) unique primary key. Here is
what I''ve got so far.
class CreateCatalogs < ActiveRecord::Migration
def self.up
create_table :catalogs, :id => false do |t|
t.string :id, :limit => 20, :null => false
t.string :version, :default =>
2006 Feb 15
2
Increment Variable
What's the best way to increment a numeric variable in the dial plan?
I tried this...
exten => s,1,Set(mainLoop=${MATH(${mainLoop}+1)})
but that converts it to a floating point number (WHY???), so I end up with 1.0000, which later on means I have to perform string manipulation to get rid of the .0000.
Thanks
Doug
2016 Apr 26
3
New UPS Support: Eaton 5S 1000
I've used NUT successfully for monitoring many different brands of UPS, but
this one has me stumped. It has the same manufacturer ID and Product ID as
older supported MGE-type Eaton UPS's, but has trouble talking. I tried
Ubuntu's repo NUT, and it logs a Connecting to UPS message every few
seconds forever, but never really succeeds (or says it fails). Different
failure mode after
2006 Mar 01
5
single transaction migrations
Hi!
It seems that migration doesn''t use single transcation to execute the
needed migrations for the database upgrade, so if I have database at
version 5, and I wrote some migrations 6..10, and error occurs while
executing migration 7, the database stays in state 6?
I also think that migration taks could use some more verbosity, for
example if migration fails, there''s no
2015 Jan 24
2
upds crash with 'Out of memory'
Hello,
I am trying to get nut running on a Windows 2012 R2 server (x64). I am
using the MSI release of 2.6.5-3. The attached UPS is an APC xs1500 (model
bx1500g). The connection is an RJ45 to USB cable.
Here is my ups.conf:
[xs1500]
driver = usbhid-ups
port = auto
desc = "APC Back-UPS xs1500"
The problem I am encountering is upsd crashing with an 'Out of memory'
error. I can
2009 Aug 21
12
What to do before launching v1.0?
I’m launching a rails website, the app is written and works, undoubtedly
it’ll be an unmitigated disaster when I launch but none the less I
thought I’d least attempt to give myself the best chance of success by
asking all the gurus here for some advice – pre launch advice if you
like.
In an ideal world I’d spend days and hours on all of these things and
get it absolutely spot on, but as we all
2008 May 20
10
Asynchronous Pipe::Server problems
Hi all,
I''ve been working on the win32-pipe library (again) and I''ve reworked
the interface. Instead of Pipe.new_server or Pipe.new_client, there''s
now a base Pipe class, with Pipe::Server and Pipe::Client subclasses.
You can find the latest code in the CVS repo.
Oh, and you''ll need to update your windows-pr library with the latest
from CVS if you want to
2015 Jan 08
3
Customising a CentOS 6.6 installation disk
I apologise if this is not the appropriate list for the following issue,
but...
Is it possible to upgrade the Linux kernel on a kickstart CD?
I've changed the vmlinuz and initrd.img files in the isolinux directory
from the distro's ISO image; so kernel 2.6.32-504.3.3.el6.i686 now boots
from a DVD, and loads the appropriate modules and firmware from the
stage 1 initrd.img.
However,