Displaying 7 results from an estimated 7 matches for "blog_develop".
2010 Sep 17
6
Rails base model
...y and to Rails. I''m coming from PHP and CakePHP.
I would like to create a base model from which all other models will
inherit from.
I have done this:
class AppModel < ActiveRecord::Base
end
and
class Post < AppModel
end
I''m getting the following error:
Table ''blog_development.app_models'' doesn''t exist
My question is, how do I tell Rails not to look for a table named
"app_models" AND am I even taking the right approach here? Is there a
better way to do this?
--
You received this message because you are subscribed to the Google Groups &q...
2006 Jul 04
8
writing to many_to_many table
I have three tables. users, posts, users_posts. This last one is to
mark a post as read.
How do I write to the users_post table?
Here''s what I have:
In model ''User_Post''
belongs_to :post
belongs_to :user
In post/view/show:
<%= link_to "Mark As Read", :controller => ''post'', :action =>
''post_read'',
:user =>
2006 Feb 09
2
postgres connection problems
...ses this postgres
installation using a tcp/ip connection, hmmmm.
So i''s thinks some more and decide that it must be a ruby problem. So I
try this script
---- ruby sript ----
require "postgres"
conn= PGconn.connect("localhost", 5432, "", "",
"blog_development","blog")
print conn.user
print conn.exec("INSERT INTO Blogs (title, contents) VALUES (''test'',
''Test contents'');")
---- ruby script end----
I go check the database and the new row is in the Blogs table.
I thinks some more and play w...
2006 Jan 16
3
the dreaded "Before updating scaffolding from new DB schema, try creating a table for your model (Blog)" error
...Versions 4.1 and 5.0 are recommended.
#
# Get the fast C bindings:
# gem install mysql
# (on OS X: gem install mysql -- --include=/usr/local/lib)
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql
database: blog_development
username: derek
password: wcug13
socket: /tmp/mysql.sock
# Connect on a TCP socket. If omitted, the adapter will connect on the
# domain socket given by socket instead.
#host: localhost
#port: 3306
# Warning: The database defined as ''test'' will be erased and...
2006 Jan 10
2
the dreaded error Before updating scaffolding from new DB s
Hi
I am pretty sure that this is a common nuby problem but I cannot figure
it out i try to run scfaoldong and get a error "Before updating
scaffolding from new DB schema, try creating a table for your model"
I have mysql set up and created the tables etc.
Derek
--
Posted via http://www.ruby-forum.com/.
2005 Dec 15
6
Code from famous RoR video?
Does anyone know where I could get text file with the code from the
famous video where they create a Weblog in 15 minutes -- The one that''s
here: href="http://rubyonrails.com/screencasts?
(I can''t just watch it here at work, and I''d like to avoid having to
re-type everything in any case.)
Thanks!
--
Posted via http://www.ruby-forum.com/.
2008 Sep 02
14
SQL 3 Lite Error
Hello everyone,
In my controller, I put the following code:
render :text => "Hello World!"
It popped up with this error:
"
MissingSourceFile in BlogController#index
no such file to load -- sqlite3
RAILS_ROOT: C:/InstantRails/rails_apps/scblog
Application Trace | Framework Trace | Full Trace
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in