Displaying 20 results from an estimated 1000 matches similar to: "+ migrations in camping"
2007 Mar 25
1
Can't use models in migrations
Hi there,
This always used to work for me... but not now. I want to blame Rails
1.2 but I''m sure its not.
I can''t use AR models in my migrations. To make sure its not just my
dodgy code I tried to do the same with a well known plugin..
acts_as_versioned.
A migration such as the one below (taken from acts_as_versioned) is
giving the error
undefined method
2006 May 16
0
! camping 1.4.1.96
I''m just about ready to release 1.4.2. Here''s the pre-release:
gem install camping --source code.whytheluckystiff.net
The biggest recent change is that the Camping commandline tool now
allows mounting of several apps. I''ve eliminated examples/serve and am
encouraging use of the camping tool. Instead, use:
camping examples/blog/blog.rb examples/tepee/tepee.rb
2007 Feb 14
0
Linking between Camping apps?
I''ve been working with Camping for a little while, reading through the
examples. The "Small Apps, Many Mounts" idea makes sense, and
interacting with other apps'' models (using the full class name) works
just as it should.
But what is the best way to include links to other mounted applications?
As a toy example, I''m trying to add links to the pages in the Tepee
2006 Feb 21
6
+ camping/session
Camping now comes with a sessioning class, checked in tonight.
To get sessions working for your application:
1. require ''camping/session''
2. include Camping::Session in your application''s toplevel module.
3. In your application''s create method, add a call to
Camping::Models::Schema.create_schema
4. Throughout your application, use the @state
2006 Aug 15
1
Camping with Dr. Nic
Campers. Dr. Nic.
The new migrations in Camping''s trunk are very nice. They also open
the door (just an inch) to using Dr. Nic''s Magic Models with Camping.
Here''s my stab at ''er:
http://require.errtheblog.com/camping/blog.rb
Run that against Camping trunk. Don''t forget to `sudo gem install
dr_nic_magic_models`.
The hackery is in
2006 May 18
0
+ Camping::FastCGI
Getting Camping to work with FastCGI is a little clunky, since FastCGI
doesn''t really understand mounting apps and sometimes the environment
vars are a little whack. To keep the postambles easy to read, I''ve
moved the handy stuff into lib/camping/fastcgi.rb.
== Mounting a Single App
Assuming: Camping.goes :Blog ... this goes in your postamble ...
require
2012 May 15
5
setting up the SQLite database
I know this isn''t Python, but I''d like to get a view on the ''one
obvious'' way to set up an SQLite (or other) database and its location
per-app. I''ve got a bit lost with the Camping 2 changes and various
code snippets I have kicking around.
1.
is it best to set up the DB creation/connection:
1.1
at the end of the app
2006 Nov 14
11
RESTful mixin, mixin repo?
Hi,
I just put together a little mixin to provide pseudo-RESTful services
in camping apps. Basically, it looks for a hidden _verb field in form
posts, and sets the @method to the supplied value (e.g. put or delete
- which browsers don''t support). This lets you define put and delete
methods in your controllers. Groovy.
Code:
http://pastie.caboo.se/22613
Is there any permanent repo of
2006 Jul 06
0
+ camping 1.4.120
Okay, let''s see.
gem install camping --source code.whytheluckystiff.net
A bunch of great stuff.
* Camping::Apps stores constants for all loaded apps.
* bin/camping can be given a directory. [1]
Like: camping examples/
* Console mode -- thank zimbatm.
Use: camping -C yourapp.rb
* Call controllers with Camping.method_missing.
Tepee.get(:Index) #=> (Response)
2006 May 17
0
acts_as_versioned with lock_version bug?
Hello.
The acts_as_versioned plugin works fine ... till the adjunction
of optimistic locking via the lock_version table column.
Here is the problem description:
Without optimistic locking things are fine:
# ++++ The table creation migration ++++
% cat db/migrate/001_create_tables.rb
class CreateTables < ActiveRecord::Migration
def self.up
create_table :softwares,
2008 Jul 10
1
AR Sessions
Hi all,
I have a little camping micro-blog that''s working well with the cookie
session store, but falls over when I try to use the AR session store.
The changes I made were:
require ''camping/session'' becomes require ''camping/ar/session''
module Blog; include Camping::Session; end becomes module Blog;
include Camping::ARSession; end
and I did the
2006 Oct 03
4
! camping 1.5 + markaby 0.5
Not too different from their corresponding last releases, but documentation
has been filled in for both.
To upgrade:
gem install camping --source code.whytheluckystiff.net
And, here is a complete changelog:
== Camping 1.5
* Camping::Apps stores an array of classes for all loaded apps.
* bin/camping can be given a directory. Like: <tt>camping examples/</tt>
* Console mode -- thank
2006 Mar 26
4
select information from sqlite_master error
Hi,
I''m having fun playing around with Camping...I am slowly working on extending tepee to a personal e-notebook sort of tool (never lose my papers/revisions....hehe).
I''ve given tepee an oswd css design, and am currently adding a admin page that I want to show the ruby version, sqlite version and db size and db stats information.
I tried running:
@db_stats =
2007 May 27
3
Stripping out textile markup
Hi,
I have several hundred pages of text, all carefully marked up with
textile, which I use redcloth to convert to html for display. Now I
find I need all these pages to alternatively output plain text - ie.
A-Za-z0-9 and simple punctuation only. Any suggestions on the best
way to do this? My only thought is to let redcloth do its stuff, and
then strip out the html tags - but it feels wrong.
2007 Aug 10
0
Reloader, Mounts, FastCGI
I''m trying to figure out how to get the Reloader to work with this kind
of a setup:
(from http://camping.rubyforge.org/classes/Camping/FastCGI.html)
---
require ''camping/fastcgi''
fast = Camping::FastCGI.new
fast.mount("/blog", Blog)
fast.mount("/tepee", Tepee)
fast.mount("/", Index)
fast.start
Tried a bunch of different variations
2006 Feb 11
2
Migrations and Unintialized Constants Error
I am running into a problem with two of my tables and the
"uninitialized constant" error when using migration.
I get the "uninitialized constant Note" when running the following
code in my migration file:
create_table :notes do |t|
t.column :id, :integer
t.column :noteshare_id, :integer
t.column :title, :string
t.column :covered, :string
2006 Oct 22
3
Keeping DRY - I like a simple life!
Hi,
I''m new to Ruby and Rails and I would be very grateful for some advice.
I''ve got the following code.
class Foo < ActiveRecord::Base
include Versionable # Some methods to handle my versioned objects
has_many :versions, :class_name => "FooVersion", :foreign_key =>
"parent_id"
belongs_to :curr, :class_name => "FooVersion",
2006 Aug 10
1
acts_as_textiled
It''s nothing revolutionary. Just a plugin which lets you forget about
the whole Textile to HTML render process. Once you tell your model
which fields should acts_as_textiled (and as long as you''re using
form_for for your text entry) it Just Works. No DB changes or
whatnot.
Here''s the skivvy: http://errtheblog.com/post/14
Tips and tricks in that post and README.
2007 Jan 16
4
question about sessions and code re-use
hey there,
i have a simple model called key_words.rb
the purpose of this is to hold system config data.
it also holds the parameters that our system uses to judge the
condition of the stuff we monitor.
anyway, one of the methods is this
def self.get_in_wet_list(status)
wet_list = find(:first,
:conditions => "name = ''wet_list'' ")
2006 Nov 25
3
[PATCH] HTTP accept filter support for FreeBSD
This small patch extends configure_socket_options to support FreeBSD''s
accf_http(9), which defers accept() until there''s a full HTTP request
to read.
Seems to work fine on 6.1-STABLE. DragonflyBSD should work too provided
the /freebsd/ line is modified to match it.
accf_http(9): http://www.freebsd.org/cgi/man.cgi?query=accf_http&sektion=9
--
Thomas