Displaying 20 results from an estimated 400 matches similar to: "the dreaded error Before updating scaffolding from new DB s"
2006 Jan 16
3
the dreaded "Before updating scaffolding from new DB schema, try creating a table for your model (Blog)" error
Hi
Can any one help me with this? I think that this is soemthing quite
simple as there is quite abit traffic about this on the web and everyone
sems to figure it out. I have tried most of the solutions that I can
find. but nothing.
I have mysql 5.0.11 working on linux redhat 9. ruby is working rails
install mysql library seem to be there.
to some trying rt get mysql to install need to
2006 Feb 09
2
postgres connection problems
Hello, I''m a newbie to rails and I am trying to do the Demo in the
November Issue of Linux Journal. Things go fine go fine until I try to
connect to my Postgres database (ver 8.1). At this point I get the
following error message
---- RoR error and trace back ----
PGError in Admin#index
could not connect to server: Permission denied
Is the server running on host "localhost"
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/.
2011 Mar 18
6
Could not find sqlite3
I am trying to get Ruby/Rails running on my mac but having some issues.
I created a new rails project "blog_test" trying to get something
working.
When I follow this guide
http://guides.rubyonrails.org/getting_started.html it says to do a
"db:create". This is where I get this error...
Could not find gem ''sqlite3 (>= 0)'' in any of the gem sources listed
2007 Apr 06
3
@ vs self in models?
i''ve seen both of these syntaxes before and have also used both in my
own models:
class Foo
def get_bar
@bar
end
end
and
class Foo
def get_bar
self.bar
end
end
seemingly with no difference... i''m a nuby though so could anyone
enlighten me to the differences if there are any?
thanks,
jeff
--~--~---------~--~----~------------~-------~--~----~
You received
2007 Aug 26
2
ror app with advanced rspec?
Hi!
Can anybody link to some ror based project what is using rspec, so
nuby as me can learn from it. So it should have updated and practising
advanced rspec.
After reading last threat about "testing behaviour or testing code?",
I just realised that I would definitely learn something from app like
that. Some casual googling didn''t help me this time.
Thanks!
Priit at
2006 May 24
1
send email from form input
OK, I am a Rails nuby, so please keep that in mind. I want to have a
form on a page where users can enter in their email address in one
field, a message in a text area field, and when they click "submit" the
message should be sent to a static email address, say me@mysite.com. I
have read the "HowToSendEmailsWithActionMailer", but I am not sure this
is exactly what I need.
2006 May 03
2
Conditional statement style
This is a bit of a nuby question methinks but i''ve had a play/search
around and it''s just bugging me now :0)
Say I have a conditional statement, testing a variable against a number
of values. The first way i did this is like so:
if myvar != "" and myvar != 0 and myvar != nil
# .. code
end
This seems a bit messy - is there neater way of doing this? I thought of:
2007 Aug 28
3
How do you keep mocks updated without pain?
Hi!
I know you must be answering a lot of basic questions, sorry about that :-)
However I have not get it, how do you keep mocks updated without pain?
I reached to the point where mocking things for view. I spec
model-controller-view using "correct doc" way mocking-stubbing (plus I
should run integration test to be sure that everything really works
together).
Now, when I want to
2006 Mar 01
2
error: uninitialized constant
total rails nuby here. I have a table "thumbnails", hence the model
Thumbnail. I''m extending the Thumbnail class with a few constants
needed for thumbnail cropping:
class Thumbnail < ActiveRecord::Base
SOURCE_FILE_PATH = "path/to/source"
TARGET_FILE_PATH = "path/to/target"
TARGET_WIDTH = 100
TARGET_HEIGHT = 100
end
Now, in my controller
2010 Sep 17
6
Rails base model
I''m very new to Ruby 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
2006 Jan 05
2
Agile Depot Tutorial Help
anyone can explain me why in the Agile Depot Tutorial application they
use i.product_id
to find if a product already exist in the cart, because the cart
contains items, each of them references a product.
I tried i.product_id like in the tutorial
and
i.product.i
all of these 2 notation works , but i find the second seems more
clean??? isn''t it.
Any explanation will be fine
Regards
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 Jun 07
2
script/generate scaffold pluralizes class names
Hi everyone,
I''m a rails & ruby nuby, and this is my first post to the list.
Here''s my environment in case it helps diagnose my problem:
Ruby version
1.8.4 (powerpc-darwin8.6.0)
RubyGems version
0.8.11
Rails version
1.1.2
Active Record version
1.14.2
Action Pack version
1.12.1
Action Web Service version
1.1.2
Action Mailer version
1.2.1
Active Support version
1.3.1
I did
2005 Oct 11
4
Searching an attribute in a hmabtm relationship
(Nuby to Ruby and Rails...)
I''ve implemented security using the login generator in a simple app so
that I have a user table, a roles table, and a join between them
(roles_users). All works as expected. I now need to check if a user
has a specific role, but my approach is off somehow.
Here''s what I''ve tried thusfar:
user_roles = @session[:user].roles
2007 Aug 15
4
nuby: how spec redirect_to at ApplicationController
Good morning rspec people!
Still rspec nuby: I must do something wrong obviously.
How can I spec about redirect_to at ApplicationController
describe ApplicationController do
it "method login_required should redirect to home path without login" do
pending "I tried to use controller.login_required.should be_redirected
and got NoMethodError with nil object
2006 Feb 03
0
Re: the dreaded error Before updating scaffolding from new D
Hi Derek,
I was getting this too, with three tables, called taxa,
databases and references
I found I could add an irregular pluralisation for taxa:
Inflector.inflections do |inflect|
inflect.irregular ''taxon'', ''taxa''
end
to the environment.rb, but no amount of modification there would
allow databases and
2006 Mar 28
8
Large Database with lots of tables
Hello all,
I am a rails nuby and I am evaluating using Rails for a new web
application. The application will have a large number of tables (>70)
that will basically mimic a large collection of paper forms that user
would otherwise have to fill out. From what I have read on rails thus
far it seems I would have to create a lot of models and form templates.
Is this common and if so does
2006 Jun 13
13
Pass infomation between different views and controllers
Hi, I am a rails and ruby nuby :-)
How do you pass data between different controllers and views? I have a
page ( a quote) that I am editing url ....quote/edit/6 6 id the
current id. I then go to a catalog (url....catalog) to add an item to
my quote (I do this via a line_item file that the quote reads) I now
want to go back to the quote. I have tried this
<%= link_to ''Back to
2006 Feb 16
2
Ferret with relative index paths
Hi,
I have ferret working fine on my Dev machine using a relative index
path as follows:
USER_INDEX = Index::Index.new(:path => "indexes/user", :key => ''id'',
:auto_flush => true)
And the indexes/user directory is located directly off the root of my
project tree.
But when I migrate this same code to my shared TextDrive account,
Ferret cannot find the index