Working Installation as RailsEngine (without the git repo)

44 views
Skip to first unread message

Michael Starke

unread,
Apr 25, 2012, 6:36:40 AM4/25/12
to fat-free-...@googlegroups.com
Good news,

I think i found all the bugs. There was a litte config line that differs and this was causing all the pain.
For the sake of easyness I'm adding the full installation steps below.

> mkdir -p path/to/app
> cd path/to/app
> rails new . --skip-bundle
> rm -rf app

If you run with apache/passenger
> rm -r public/index.html

Change config/database.yml to your likings

Add the following to config/application.rb
> Railties.engines.each do |engine|
> config.paths['db/migrate'] += engine.paths['db/migrate'].existent
> end

And this is the important part - uncomment this line!
That's what cause the migrations to fail and prevented the forms to be submitted the correct way.
> # config.active_record.whitelist_attributes = true

If you use the stock gem, you need to re-enable asset compiling by changing environments/production.rb
> config.assets.compile = true

I used this gem file
> gem "fat_free_crm", "~> 0.11.1"
> gem 'mysql', "~> 2.8.1"

You have to add these, so the assest will get compiled (I guess, but correct me if I'm wrong. At least coffee-rails is mandatory

> gem 'sass-rails', '~> 3.2.3'
> gem 'coffee-rails', '~> 3.2.1'
> gem 'therubyracer'
> gem 'uglifier', '>= 1.0.3'

run the setup
> rake ffcrm:setup

or do just the steps you want
> rake db:create
> rake db:migrate
> rake ffcrm:setup:admin

If you use apache, a simple VHost config that should work.
(from the passenger documentation)
> <VirtualHost *:80>
> ServerName my.crm.com
> DocumentRoot /path/to/app/public
> <Directory /path/to/app/public>
> Allow from all
> Options -MultiViews
> </Directory>
> </VirtualHost>

Hope this helps someone out there =)
By the way, this Did the trick in figuring out the cuprits =) shoudl have thought of that yesterday.
> diff --rq /git/fat_free_app/ /my/ruby/app


So long,
Michael

ben tillman

unread,
Apr 25, 2012, 7:00:10 AM4/25/12
to fat-free-...@googlegroups.com
Thanks for figuring that one out, we should probably go through all
our models and add attr_accessible for all the fields that should be
mass assigned.

> --
> You received this message because you are subscribed to the Google Groups "Fat Free CRM Users" group.
> To post to this group, send email to fat-free-...@googlegroups.com.
> To unsubscribe from this group, send email to fat-free-crm-us...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/fat-free-crm-users?hl=en.
>

Michael Starke

unread,
Apr 25, 2012, 5:42:58 PM4/25/12
to fat-free-...@googlegroups.com
I hope it helps =)

after I managed to test the app a bit i ran into another error - that doesnt work with the upacked gem nor the railsengine. Tags do not get created, when you enter them and press return. I tested this in the demo - works - the git version works to but I still like the gem-approach a bit more =)

Was this a known issue that has be fixed? And talking about fixes - you did a lot of fixing, any plans when to push the next version as a gem?

Take care,
Michael

ben tillman

unread,
Apr 25, 2012, 7:45:41 PM4/25/12
to fat-free-...@googlegroups.com
Hi Michael,

Yes we should push a new version of the gem. I was working on a group
permissions model that I planned to include in the next release but
that requires more testing. So we should probably have an interim bug
fix release.
Reply all
Reply to author
Forward
0 new messages