Bower runs as Bundler on zsh/oh-my-zsh - zsh

Whenever I run bower install or any bower command, it ends up running as bundle install or something else from bundler. I'm running a zsh shell with oh-my-zsh. It works as expected in a bash shell.
Example output:
% bower install
bundle install requires at least 0 argument: "bundle install".
Running whence -p bower yields /usr/local/bin/bower, which is symlinked to /usr/local/lib/node_modules/bower/bin/bower.
Running /usr/local/bin/bower install works just fine. I'm thinking there is a place where bundle or bower has been aliased wrong, or oh-my-zsh's autocomplete isn't working properly, but I can't imagine where that would be. I could add alias bower='/usr/local/bin/bower' to my .zshrc but I'd like to solve this properly.
Thanks for any help.

Had the same issue. Removed the bower plugin from my .zshrc file and everything started working again.

Use whence -vs bower to find zsh's interpretation of bower. -v will add the type if it's not a command, -s will also show a symlink-free path in case the pathname contains symlinks.
whence -p bower does a path search even if it is an alias or function and will only return found paths but nothing else. So this will not help you to find if it is an alias.

I personally fixed this by uninstalling and reinstalling bower and bundler. However, it seems (as I thought) that ZSH was somehow overriding one with the other. #m_gol has been kind enough to submit a fix in oh-my-zsh to fix this.

Related

Is there a way to install a rubygem manually without accessing rubygems.org?

So i have this IPv6 thingy issue where i can't access rubygems and connection times out before it gets to use IPv4. One way or another i managed to install rubygems and when i type -v it all checks out. Now i need Jekyll and Jekyll-paginate-v2. I tried gem install jekyll and it didn't work for reasons stated above. Strangely enough i was able to install Jekyll via sudo apt install jekyll. Tried that with jekyll-paginate-v2 but there's no such option. So is there any way to install it without using gem command?
ok so i found a way of solving this issue.
to install a gem you need a .gem file and since you can't access rubygems.org we will get it from github. just go to your gem's github page, download it and then open bash in that directory, type gem build gemname.gemspec and it will create a .gem file in this directory. after that just use gem install --local gemname.gem and that's it.

Reinstall Active Meteor Project

Background
I suddenly started getting a Meteor error:
~/.meteor/packages/meteor-tool/.1.4.0-1.1b1o7uq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?`
After extensive searching, I came to the conclusion that there isn't a known, straight-forward solution to this problem.
Possible Solution
I created a new Meteor project and that works. This is because it is at the latest version of Meteor, and fibers.node is properly installed in the 1.6 (latest version) directory.
The best solution looks to be removing my live project directory and recreating it with the same name (at Meteor's latest version) and then retrieving all the packages, settings and files (HTML, JS, CSS)
Question
What is the best way to do this so that:
I preserve all the packages that I have installed (there are many)
I preserve all the custom settings that have changed from default
I am able to bring all my files (I am assuming this will be simple copy of *.html, *.css and *.js from the original project)
I was able to resolve the error:
~/.meteor/packages/meteor-tool/.1.4.0-1.1b1o7uq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?
so did not need to go down the reinstalling project path.
I followed the steps in the accepted answer on this thread:
How can I completely uninstall and then reinstall Meteor.js?
Specifically:
mv .meteor .meteor.bak
sudo rm /usr/local/bin/meteor
sudo chown -R $(whoami) ~/.npm/
curl https://install.meteor.com/ | sh
meteor --version -> This will pull the required package for the version your project is at.

Is it okay to copy and paste a grunt directory?

I have a Grunt setup on my machine that's running SASS, Compass, Watch, Uglify... that kind of stuff. I've installed it using the command line (npm install...) from a tutorial.
I want to create a Grunt folder for another project. Is it okay to just copy that first folder and change the names? Is there some reason I should install the new one from the command line as well?
it will depends on what context you installed if was local or globally (-g).
If you installed locally without -g option, you are find to copy and past the folders.
However, would be a great practice to reuse only the package.json file and run the command, for your next project:
$ npm install

LESS css compiler help in terminal

Im using Ubuntu 13.04 (Linux)
I have installed node, and npm. With npm I downloaded less via terminal.
Im using this on my simple HTML/CSS project. pure frontend. its not a Ruby or nodejs project.
And when I do
lessc styles.less styles.css -x -w
in terminal, it compiles and compresses the code, but doesn't watch the file for changes, since Im expecting LESS to auto compile and refresh the page automatically. So, if I do any changes in my styles.less, every-time I have to go to terminal and enter the command to compile the less css.
Also, the compiler does NOT even show any compile errors even if I add anything on purpose, but in that case it doesn't compiles.
Please guide me on how to achieve the above. This is my first day with LESS CSS.
If you type lessc help you will see that there is no argument -w or --watch. What you can do is to use a build system like GruntJS with an extension like grunt-contrib-watch and have that monitor your less files and build the css on change.
I did this with help of #Oil on ubuntu forums.
In terminal,
1. install sudo apt-get install inotify-tools
then simply CD to the css folder.
and run below lines together:
while inotifywait -r styles.less; do
lessc -x styles.less styles.css;
done

How to know the path of Compass executable?

I am trying to use compass with Drupal 7, Basic theme and Compass module on my local hosting on Windows. It is already installed on my computer. Should i install it to my local webserver again, how can i know the path of existing Compass exutable?
Some more details would help get to the root of the problem:
Are you running compass from the command line, or using a GUI utility?
Did you install compass via gem install compass ?
What version of Windows are you running?
If you have properly installed ruby and compass, you should be able to cd into your drupal theme's directory and run compass watch to compile.
You can use the where command from the windows command prompt (where compass or, if that doesn't work where ruby) which will search your current directory and $PATH. If you cannot find compass, then you may need to reinstall compass/ruby.
Hope that helps!

Resources