oswaldoacauan / ghostium

A Ghost theme focused on content based on Medium design/ux.
https://ghost.org/?lmref=our-LA
MIT License
1.27k stars 383 forks source link

header js file not generated properly after - grunt dryrun - #76

Closed leonfs closed 10 years ago

leonfs commented 10 years ago

I tried to modify a few things on .scss files and after running grunt dryrun to compile all the changes the javascript header file shows empty. Modernizr is not being loaded and images wont load..

I've just realized that the _components folder within the assets directory is missing.

npm install is failing at the post scripts execution.

npm ERR! ghostium@2.1.1 postinstall: bundle install && bower install npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the ghostium@2.1.1 postinstall script. npm ERR! This is most likely a problem with the ghostium package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! bundle install && bower install npm ERR! You can get their info via: npm ERR! npm owner ls ghostium npm ERR! There is likely additional logging output above. npm ERR! System Linux 3.11.0-12-generic npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! cwd /home/$user/Workspace/ghost/content/themes/ghostium-master npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/$user/Workspace/ghost/content/themes/ghostium-master/npm-debug.log npm ERR! not ok code 0

ghost commented 10 years ago

Hi,

I'm getting exactly the same error messages and the _components folder is missing... How did you get around this?

Thanks

leonfs commented 10 years ago

Hi,

Yes, bad for me that I didn't publish the solution. Sorry.

The problem is that, as you can see, there is a problem during the "postinstall" script. If you take a look to package.json, at the bottom of the file you will see the scripts. The problem is with postinstall.

bundle install && bower install

You have to make sure that:

  1. You have bower install (npm install -g bower)
  2. You have bundle installed, you will need ruby running on your system (gem install bundler).

Once you have bundler then all ruby dependencies (sass, csscss) will get installed and that will fix the problem.

Please let me know if you need more information.

Have a great day, Leo.-

ghost commented 10 years ago

Thanks for your answer,

Ghostium author told me to do just this: npm install bower install

But it seems little more complicated then that...

npm install -> gives that bunch of errors posted above bower install -> gives this "bower ENOGIT git is not installed or not in the PATH"

And while I could install npm install -g bower gem install bundler gives this error

"error installing bundler: bundler requires RubyGems version >= 1.3.6"

Trying to install rubygems in it's turn give more errors...

I'm using ruby 1.8.7 version and o mac it's hard to override /Library/Ruby/Gems/1.8 etc...

What to do??? Julia

ghost commented 10 years ago

"hard to override /Library/Ruby/Gems/1.8" meaning not recommended ...

leonfs commented 10 years ago

Try to remove the current version of Ruby you have installed. And reinstall 1.9.3 (it's the one I have and works fine -under Linux Mint 16 and Windows - )

I think you could also try to do: gem update --system (run it with root/sysadmin privileges)

ghost commented 10 years ago

Trying to understand the whole picture of steps and dependencies for ghostium theme project (on Mac OS):

1) installing node.js and NPM. It gets installed in /usr/local/lib/node_modules/ 2) installing ghost platform wherever, as for example in /Downloads/ghost-0.4.2/ 3) downloading the theme, unzipping, putting it into /ghost-0.4.2/content/themes/ghostium-master 4) if no changes to be made in theme, it's simple - just to change the theme settings in ghost admin interface

5) when changes ARE to be done in theme css/html code in /src/ folder it needs to be recompiled, for that we need the following installations: // general question to the steps below: where should these commands run from : the /Downloads/ghost-0.4.2/ folder - OR - from inside the theme folder? 5.1) install grunt.js - npm install -g grunt-cli // OK 5.2) install SASS - gem install SASS // OK 5.3) install grunt sass plugin contrib-sass - npm install grunt-contrib-sass // OK

- from here every next step fails - 

5.4) install bower - npm install -g bower // ERROR : errno 3
        npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/bower'

5.5) also for bower to be installed git needs to be installed
5.6) gem install bundler // ERROR : While executing gem ... (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/1.8/gems/bundler-1.6.1/.gitignore

5.7) next inside the theme folder the two commands need to be executed:
    npm install // ERROR : An error occurred while installing csscss (1.3.2), and Bundler cannot continue.
            Make sure that `gem install csscss -v '1.3.2'` succeeds before bundling.

            ...fails on your system:  npm 
            ERR! bundle install && bower install

    bower install  // ERROR : /usr/local/bin/bower: No such file or directory

5.8) trying to install gem install csscss -v '1.3.2  // ERROR :     csscss requires Ruby version >= 1.9.
5.9) next ???

Am I doing things in right order? What am I doing wrong ? What else needs to be installed? Will try to update ruby as mentioned in post above ... 
leonfs commented 10 years ago

It seems to me that you are not running the installation with the right privileges. You are getting "Permission denied".

ghost commented 10 years ago

yes, well; i'm trying to run commands without sudo ...

leonfs commented 10 years ago

Well.. I think the message it's clear as well. You need to upgrade your Ruby Version...

csscss requires Ruby version >= 1.9.

Yesterday I said as well that you should remove your old version of Ruby and install 1.9.3. Have you tried to do that?

ghost commented 10 years ago

No I did not try that because changing Ruby on Mac is kind of complicated and I was scared to really mess up with my system :(

leonfs commented 10 years ago

If you have a powerful system, with at least 8GB of RAM I would recommend you to work in VMs. So you don't have to worry about messing up your system + you can take the VM images to other computers on a external hard drive or USB stick.

For example 2 weeks ago I cleand my laptop, and installed windows 8.1 I didn't lose any of the dev environments I had (Linux, Windows Server). After reinstalling the system I just copied the backups. Fully operational in 5 minutes.

ghost commented 10 years ago

Unfortunately it's not an option either, as it's an old machine with 4Gb of RAM and 1.6.8 OS version. So, I'm reading now on the internet how to install new version of ruby on mac -> it's really messy: it needs RVM - ruby version manager (easy) and Xcode (not easy - no place) to be installed...

leonfs commented 10 years ago

May the "FORCE" be with you..!!

ghost commented 10 years ago

My main consideration is though whether the steps I've listed above are enough and in right order?

ghost commented 10 years ago

After updating Ruby and a bunch of other installs, and successful gem install bundler I'm trying to do bower install. Here i get this error: No versions found in git://github.com/ftlabs/fastclick.git

ghost commented 10 years ago

well actually i'm getting this message in a loop for modernizr, fastclick, font-awesome, jquery, jquery-pjax

ghost commented 10 years ago

Is _components folder is supposed to be missing ?

ghost commented 10 years ago

Bower install errors:

No tags found in git://github.com/Modernizr/Modernizr.git No branches found in git://github.com/Modernizr/Modernizr.git

ghost commented 10 years ago

Anyone any ideas?

oswaldoacauan commented 10 years ago

Try to clean bower cache bower cache clean

ghost commented 10 years ago

Yep, sure done that, but keep getting this message in a loop (after each try and bower clean cache ) for : modernizr, fastclick, font-awesome, jquery, jquery-pjax...