Error while assets precompile

344 views
Skip to first unread message

Prabu Raja

unread,
Apr 23, 2014, 3:59:09 AM4/23/14
to car...@googlegroups.com
I am trying to setup cartodb in production mode.

Hi,

When I try to precompile assets getting error with following message

"Fog provider can't be blank, Fog directory can't be blank".

Below I have mentioned commands I run and error I received.

Terminal 1:

/* move to catrodb directory */
$ cd cartodb20
/* Start redis server */
$ redis-server &

Terminal 2:


/* move to catrodb directory */
$ cd cartodb20

In app/controllers/application_controller.rb, comment out line #18 - #25 to disable SSL
In config/environments/production.rb, change server_static_assets to true


/* Pre compile assets */
$ bundle exec rake assets:precompile

Now getting following output in screen

cartodb20/lib/importer/lib/cartodb-importer/importer.rb:20: warning: already initialized constant SUPPORTED_FORMATS
.rvm/rubies/ruby-1.9.2-p320/bin/ruby .rvm/gems/ruby-1.9.2-p320@cartodb/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets
cartodb20/lib/importer/lib/cartodb-importer/importer.rb:20: warning: already initialized constant SUPPORTED_FORMATS
AssetSync: using cartodb20/config/initializers/asset_sync.rb
cartodb20/lib/importer/lib/cartodb-importer/importer.rb:20: warning: already initialized constant SUPPORTED_FORMATS
AssetSync: using cartodb20/config/initializers/asset_sync.rb
rake aborted!
Fog provider can't be blank, Fog directory can't be blank

Tasks: TOP => assets:sync
(See full trace by running task with --trace)
rake aborted!
Command failed with status (1): [.rvm/rubies/ruby-1.9.2-p320/bi...]

Tasks: TOP => assets:precompile
(See full trace by running task with --trace)


I am new to RAILS and don't know what going wrong.

Thanks in advance for the support!
Prabu

Javier Santana

unread,
Apr 23, 2014, 4:15:16 AM4/23/14
to car...@googlegroups.com
Hello, 

we are not using assets pipeline anymore, this is how you should proceed:



--

---
You received this message because you are subscribed to the Google Groups "cartodb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cartodb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
www.cartodb.com
Map, analyze and build applications with your data

Prabu Raja

unread,
Apr 28, 2014, 5:31:03 AM4/28/14
to car...@googlegroups.com
Thanks Javier.

I tried grunt facing below some error, please help to solve this.

Run the following commands

$ npm install -g grunt-cli
$ cd <cartoDB_root>/lib/build
$ npm install
$ grunt


after giving grunt command got below output.

>> Local Npm module "grunt-timer" not found. Is it installed?

Running "clean:src" (clean) task
Cleaning app_config.js...OK
Cleaning ./.sass-cache...OK
Cleaning ../../app/assets/stylesheets/tmp...OK
Cleaning ../../public/assets/2.13.13...OK
Task 'clean:src' took 60ms

Running "config" task

Running "cdb" task
cartodb.js not updated
Task 'cdb' took 92ms

Running "concat:js" (concat) task
File "../../public/assets/2.13.13/javascripts/dashboard.js" created.
File "../../public/assets/2.13.13/javascripts/public_dashboard.js" created.
File "../../public/assets/2.13.13/javascripts/application.js" created.
File "../../public/assets/2.13.13/javascripts/cdb.js" created.
File "../../public/assets/2.13.13/javascripts/common_data.js" created.
File "../../public/assets/2.13.13/javascripts/keys.js" created.
File "../../public/assets/2.13.13/javascripts/login.js" created.
File "../../public/assets/2.13.13/javascripts/models.js" created.
File "../../public/assets/2.13.13/javascripts/organization.js" created.
File "../../public/assets/2.13.13/javascripts/specs.js" created.
File "../../public/assets/2.13.13/javascripts/table.js" created.
File "../../public/assets/2.13.13/javascripts/table_public.js" created.
File "../../public/assets/2.13.13/javascripts/tipsy.js" created.
File "../../public/assets/2.13.13/javascripts/respond.js" created.
File "../../public/assets/2.13.13/javascripts/statsc.js" created.
File "../../public/assets/2.13.13/javascripts/all.js" created.

Running "copy:vendor" (copy) task
Copied 4 files
Task 'copy:vendor' took 10ms

Running "copy:app" (copy) task
Created 8 directories, copied 329 files

Running "compass:dist" (compass) task
Sass::SyntaxError on line ["166"] of /opt/cartodb2.0/cartodb20/app/assets/stylesheets/tmp/common/mixins.scss: Invalid US-ASCII character "\xE2"
Run with --trace to see the full backtrace
directory ../../public/assets/2.13.13/stylesheets/map/
directory ../../public/assets/2.13.13/stylesheets/keys/
directory ../../public/assets/2.13.13/stylesheets/specs/
directory ../../public/assets/2.13.13/stylesheets/table/
directory ../../public/assets/2.13.13/stylesheets/front/
directory ../../public/assets/2.13.13/stylesheets/pages/
directory ../../public/assets/2.13.13/stylesheets/common/
directory ../../public/assets/2.13.13/stylesheets/embeds/
directory ../../public/assets/2.13.13/stylesheets/vendor/
directory ../../public/assets/2.13.13/stylesheets/plugins/
directory ../../public/assets/2.13.13/stylesheets/elements/
directory ../../public/assets/2.13.13/stylesheets/dashboard/
directory ../../public/assets/2.13.13/stylesheets/table/header/
directory ../../public/assets/2.13.13/stylesheets/organization/
directory ../../public/assets/2.13.13/stylesheets/table/geocoding/
directory ../../public/assets/2.13.13/stylesheets/public_dashboard/
directory ../../public/assets/2.13.13/stylesheets/table/table_panel/
directory ../../public/assets/2.13.13/stylesheets/public_dashboard_ie/
directory ../../public/assets/2.13.13/stylesheets/table/table_content/thead/
directory ../../public/assets/2.13.13/stylesheets/table/table_panel/layer-views-panels/
   create ../../public/assets/2.13.13/stylesheets/vendor/codemirror.css (0.068s)
   create ../../public/assets/2.13.13/stylesheets/vendor/leaflet.draw.css (0.051s)
   create ../../public/assets/2.13.13/stylesheets/vendor/show-hint.css (0.009s)
   create ../../public/assets/2.13.13/stylesheets/vendor/cartodb.css (0.854s)
    error password_protected.scss (Line 166 of mixins.scss: Invalid US-ASCII character "\xE2")
Warning: â Use --force to continue.

Aborted due to warnings.

Javier Santana

unread,
Apr 28, 2014, 5:50:38 AM4/28/14
to car...@googlegroups.com
try doing: 

export LC_ALL="en_US.UTF-8"

before grunt

Prabu Raja

unread,
Apr 28, 2014, 11:22:25 AM4/28/14
to car...@googlegroups.com
Thanks again.

That solved the problem.

I am getting user home page and login screen. But when I am trying to login, getting "500 Error" page without any style/image.

When I see the page source (for 500 Error page), all assets are referring to wrong path.

referring to
 /assets/common.css
 /assets/jquery.min.js

instead of like below
 /assets/2.13.13/stylesheets/common.css
 /assets/2.13.13/javascripts/login.js

Also in production I have setup service script for Windshaft (following this as reference) which is failing with following error code. 

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at Object.exports.join (path.js:358:36)
    at Object.exports.register_system_fonts (
<Windshaft_root>/node_modules/mapnik/lib/mapnik.js:67:24)
    at Object.<anonymous> (
<Windshaft_root>/node_modules/mapnik/lib/mapnik.js:98:9)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
error: Forever detected script exited with code: 8


Please advice me on this, I couldn't get dashboard page right now.
Reply all
Reply to author
Forward
0 new messages