Congrats on solving the problem!!

Btw, we use a seed rake task that uses yml files to populate default db
data. I haven't tried seed_fu yet so I can't comment on that.

On Wed, Oct 28, 2009 at 6:04 AM, Carl Fyffe <[email protected]> wrote:

>
> Use seed_fu:
>
>
> http://www.intridea.com/2008/4/19/seed-fu-simple-seed-data-for-rails?blog=company
>
> Rails 2.3.4 has this capability, but CE is still on 2.3.2. In the mean
> time, use seed_fu
>
> On Tue, Oct 27, 2009 at 6:00 PM, SS <[email protected]> wrote:
> >
> > Ah! Finally resolved the problem by overriding roles.yml fixture in my
> > own /test/fixtures and executing 'heroku rake db:fixtures:load' cmd.
> > I think my problem was a combination of not having the required data
> > loaded in the database tables and possibly a caching issue of my
> > browser.
> >
> > Jim do you think it's a good idea to use fixtures to load default data
> > or should I use migration files for that purpose?
> >
> > SS
> >
> > On Oct 27, 1:01 pm, SS <[email protected]> wrote:
> >> I just verified that my Role database table has all three roles. I'm
> >> using Heroku console to do that.
> >>
> >> Ruby console for testsite.heroku.com>> r = Role.find(3)
> >>
> >> => #<Role id: 3, name: "member">>> r =  Role[:member]
> >>
> >> ActiveRecord::RecordNotFound: Couldn't find a Role identified by
> >> (:member)
> >>
> >> I had to load the fixtures in order to populate my Roles table.
> >> Is there another way already setup that allows me to populate default
> >> values in CE db tables?
> >>
> >> On Oct 27, 11:52 am, SS <[email protected]> wrote:
> >>
> >> > Jim, I'm fairly new to Heroku and CE and your questions help me get
> >> > closer to the core problem. This is the error message that I get on
> >> > the server:
> >>
> >> > Processing UsersController#create (for 174.0.115.254 at 2009-10-27
> >> > 08:48:22) [POST]
> >> >   Parameters: {"user"=>{"birthday(2i)"=>"10", "birthday(3i)"=>"27",
> >> > "password_confirmation"=>"test", "password"=>"test",
> >> > "login"=>"user123", "birthday(1i)"=>"1984",
> >> > "email"=>"[email protected]"}, "commit"=>"Sign Up!",
> >> > "inviter_code"=>"", "authenticity_token"=>"R+WtL
> >> > +yMWBOQETTOvolHRgWA0VC25fZYybv7OOCyE40=", "inviter_id"=>""}
> >>
> >> > ActiveRecord::RecordNotFound (Couldn't find a Role identified by
> >> > (:member)):
> >> >   vendor/plugins/community_engine/plugins/enumerations_mixin/lib/
> >> > active_record/acts/enumerated.rb:125:in `enforce_strict_literals'
> >> >   vendor/plugins/community_engine/plugins/enumerations_mixin/lib/
> >> > active_record/acts/enumerated.rb:56:in `send'
> >> >   vendor/plugins/community_engine/plugins/enumerations_mixin/lib/
> >> > active_record/acts/enumerated.rb:56:in `[]'
> >> >   vendor/plugins/community_engine/app/controllers/users_controller.rb:
> >> > 107:in `create'
> >> >   haml (2.2.3) lib/sass/plugin/rails.rb:19:in `process'
> >> >   /home/heroku_rack/lib/static_assets.rb:9:in `call'
> >> >   /home/heroku_rack/lib/last_access.rb:25:in `call'
> >> >   /home/heroku_rack/lib/date_header.rb:14:in `call'
> >> >   thin (1.0.1) lib/thin/connection.rb:80:in `pre_process'
> >> >   thin (1.0.1) lib/thin/connection.rb:78:in `catch'
> >> >   thin (1.0.1) lib/thin/connection.rb:78:in `pre_process'
> >> >   thin (1.0.1) lib/thin/connection.rb:57:in `process'
> >> >   thin (1.0.1) lib/thin/connection.rb:42:in `receive_data'
> >> >   eventmachine (0.12.6) lib/eventmachine.rb:240:in `run_machine'
> >> >   eventmachine (0.12.6) lib/eventmachine.rb:240:in `run'
> >> >   thin (1.0.1) lib/thin/backends/base.rb:57:in `start'
> >> >   thin (1.0.1) lib/thin/server.rb:150:in `start'
> >> >   thin (1.0.1) lib/thin/controllers/controller.rb:80:in `start'
> >> >   thin (1.0.1) lib/thin/runner.rb:173:in `send'
> >> >   thin (1.0.1) lib/thin/runner.rb:173:in `run_command'
> >> >   thin (1.0.1) lib/thin/runner.rb:139:in `run!'
> >> >   thin (1.0.1) bin/thin:6
> >> >   /usr/local/bin/thin:20:in `load'
> >> >   /usr/local/bin/thin:20
> >>
> >> > Rendering /disk1/home/slugs/72014_f8b5bb6_77f5/mnt/public/404.html
> >> > (404 Not Found)
> >>
> >> > When I deployed my app on Heroku I run (as specified in the Heroku CE
> >> > tutorial):
> >> > sudo>rake db:schema:load
> >>
> >> > ...and after I debugged the error message above, I loaded the fixtures
> >> > just so that I ensure all of the roles in my 'roles' database table
> >> > are there since it looks like the server is complaining that can't
> >> > find the 'member' role and assign it to the new user. The tree roles -
> >> > admin, moderator and member are in my local copy of CE.
> >> > Do I need to run another rake command? In the tutorial it's not
> >> > pointed out that I need to run 'rake db:migrate', do I need to?
> >>
> >> > Thanks,
> >> > SS
> >>
> >> > On Oct 27, 12:15 am, Jim Ruther Nill <[email protected]> wrote:
> >>
> >> > > the url is /users since you are in the create action of the users
> controller
> >> > > and that's where the error occurred.
> >> > > a 404 usually means that you are missing a template. could you post
> any log
> >> > > message regarding this error?
> >>
> >> > > On Tue, Oct 27, 2009 at 1:33 PM, SS <[email protected]>
> wrote:
> >>
> >> > > > yeah, my APP_URL is set in the production.rb. I noticed that if I
> >> > > > select (highlight) the URL in the browser and press Enter, the
> server
> >> > > > directs me to People section on the website, however after I sign
> up
> >> > > > it doesn't take me all the way to the ../users (People) page.
> >>
> >> > > > On Oct 26, 7:24 pm, Jim Ruther Nill <[email protected]> wrote:
> >> > > > > hmm.. maybe you've missed assigning APP_URL in
> >> > > > environments/production.rb?
> >>
> >> > > > > On Tue, Oct 27, 2009 at 4:53 AM, SS <
> [email protected]> wrote:
> >>
> >> > > > > > Hi,
> >> > > > > > I'm trying to create a new user account (Sign Up) via my
> deployed
> >> > > > > > version of CE on Heroku. However, after I enter all the
> information in
> >> > > > > > the form and submit (Sign Up!) I keep getting a redirect to
> the 404
> >> > > > > > page saying that:
> >>
> >> > > > > > "The page you were looking for doesn't exist.
> >> > > > > > You may have mistyped the address or the page may have moved."
> >>
> >> > > > > > All my files are successfully added to git index and pushed to
> Heroku
> >> > > > > > server. I looked in users_controller.rb line 289 and I can't
> figure
> >> > > > > > out why it doesn't render the 'signup_completed' page.
> >>
> >> > > > > > By default the AppConfig.closed_beta_mode flag is set to false
> in
> >> > > > > > application.yml. Do I need to change that config flag to true
> when I
> >> > > > > > deploy, or change something else in my application.yml? I
> tried
> >> > > > > > changing closed_beta_mode to true, but that didn't have any
> impact
> >> > > > > > whatsoever, got the same redirect page.
> >>
> >> > > > > > Note: This is not a problem in development, only in
> production.
> >>
> >> > > > > > Please let me know of a configuration that I might be missing.
> I've
> >> > > > > > setup my ActionMailer to work with Gmail in the following
> manner:
> >>
> >> > > > > > ActionMailer::Base.delivery_method = :smtp
> >> > > > > > ActionMailer::Base.smtp_settings = {
> >> > > > > >        :address => "smtp.gmail.com",
> >> > > > > >        :port => 587,
> >> > > > > >        :domain => "gmail.com",
> >> > > > > >        :authentication => :plain,
> >> > > > > >        :user_name => "siyan",
> >> > > > > >        :password => "123456",
> >> > > > > >        :enable_starttls_auto => true
> >> > > > > > }
> >>
> >> > > > > > Thanks,
> >> > > > > > SS
> >>
> >> > > > > --
> >> > > > > "We do not believe in ourselves until someone reveals that deep
> inside us
> >> > > > is
> >> > > > > valuable, worth listening to, worthy of our trust, sacred to our
> touch."
> >> > > > -
> >> > > > > E. E. Cummings
> >>
> >> > > --
> >> > > "We do not believe in ourselves until someone reveals that deep
> inside us is
> >> > > valuable, worth listening to, worthy of our trust, sacred to our
> touch." -
> >> > > E. E. Cummings
> >>
> >>
> > >
> >
>
> >
>


-- 
"We do not believe in ourselves until someone reveals that deep inside us is
valuable, worth listening to, worthy of our trust, sacred to our touch." -
E. E. Cummings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CommunityEngine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/communityengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to