What will happen to rails app if I delete rvm? - ruby-on-rails-4

I'm working on making my first very simple rails app, and I think I'm running into trouble because I have both rvm and rbenv installed.
I'm not actually sure if it's related to that, but I thought it might be --
I'm trying to run the command: sudo rake gems:install
and I'm getting this error message:
Could not find rake-11.1.1 in any of the sources
I ran bundle update rake and bundle install, and when I write 'which rake' - I get this: (which is why I thought it might be related to the fact that I have both rvm and rbenv included in my bash_profile)
/.rvm/gems/ruby-2.1.2/bin/rake
If this is the issue --- what will happen if I uninstall rvm? I don't really understand what it does well enough to understand what it will do to my existing code.
Thanks!

rvm is a great toolset for managing multiple ruby versions. I think of it like a tackle box for fishing: You've got different ruby versions, 1.9.3, 2.0.0, 2.2.3, etc. like the layers on the tackle box. rvm keeps a different directory for each version of ruby you have installed.
If you rvm use 2.2.3 you're telling your shell to point to ~/.rvm/rubies/ruby-2.2.3/bin/ruby (check which ruby to be sure).
If you rvm use system and then which ruby you'll see /usr/local/bin/ruby, or the system-installed version
You can put different gems (tackle/bait/tools) in each one. This is immensely useful if you're developing on multiple ruby apps/gems at the same time.
If you rvm implode you'll clean all the .rvm/ruby installs out of your system. This is a good, safe way to keep your system ruby untainted, which is more of a hassle to reinstall.
Go ahead and try reinstalling rvm and bundle-installing.

Related

Missing binding Node Sass

When I use "yarn build", i got an error message:
Error: Missing binding /www/htdocs/node_modules/node-sass/vendor/linux-x64-57/binding.node
Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 8.x
Found bindings for the following environments:
- Linux 64-bit with Node.js 10.x
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to download the binding for your current environment.
I tried to use npm rebuild node-sass but it didn't work. What should I do?
This problem seems to be related to globally installed packages.
I have been fighting getting a CMS package - Enduro - to work and finally I found a solution.
Normally Enduro is installed in /usr/local/lib however it can also be installed in the project. When I run Enduro from the /usr/local/lib I get the "sass version error" like you. However when I run the local project version ./node-modules/.bin/enduro there is no version problems.
I got no clue how to fix the global installation since the bindings will not fix when I run the rebuild sass command.
But running Enduro from the project works fine for me for now.
I hope you can use some of this even if you are dealing with another product using Sass.

How to install Rasa Stack in Windows 10?

Maybe someone else asked the same question too. But this question is difficult. I tried everything. The place I am stuck is with installing dependencies. Some of the dependencies are old and not easily available. But I managed to install them.
The problems lies here.. There are dependencies that need to get the build from their source code. I already installed Visual C++ Build and MSMPI. Also installed HDF5 for H5PY but it doesn't let me build old versions of H5PY. So, I tried installing the latest version of H5PY but still, I am stuck at errors like file not found. Some of the files which the build process cannot find are "h5py/h5f.pyx", "mpi_c", "mpi.h". Solving error for one missing file leads to other and so on..
On trying hard to solve such errors and installing one or the other package to do the same task, I am tired up.. Something I found, at last, was that "mpi_c" file was replaced with some other file in newer versions of MPI4PY. But my dependencies depend on older version. I tried installing an older version of MPI4PY but HDF5 won't let me install that giving other errors. At last, I quit the task with my whole day wasted after this.
So can someone here please provide a step by step guideline for installing Rasa Stack on Windows Machine?
Windows 10 with Python 3.7.. Let me know if I need to downgrade python as well.. It was my first time building some project from source with python on windows. Thanks...
Please try the below steps to install Rasa:
Install Conda
Create a virtual environment:
conda create -n myenv python=3.5
Activate the virtual environment
conda activate myenv
pip install rasa_nlu rasa_core

Calabash Android test procedure got very slow

I been using calabash-android for long time with real device, but never had this kind of slow testing procedure.I mean it used to go really in seconds to test my scenarios, but now it takes more than 1 minute .. It is the same laptop, only difference I tested on 15.04 Ubuntu before. Now I'm on
Ubuntu 14.04.03LTS 64bit
... Is it library missing or update to be made? or is Calabash got slower. Have no idea why its doing this...
please can u suggest how to get my speed back?
Thanks in advance
We've actually recently made speed improvements to the queries, so the framework itself shouldn't be the cause of any new slowness. Which version are you using? Should be 0.6.0.
If you're saying you've downgraded your OS from 15.04 to 14.04, that would probably be my first guess. Is there any difference in log output from before if you run with -v for verbose?
Never mind, I found out that Ruby version is old and reason cause installing Ruby through sudo new version was wrong way, cause it's not setting latest version to default. So I had to install RVM Ruby Version Manager and install latest ruby and set latest ruby version --default and re-install my Calabash-Android.

what do I need to manage zurb-foundation gems?

I have multiple projects using different versions of zurb-foundation. I want to use the sass/compass implementation. We have multiple people working on these projects and we need consistent authoring environments.
We aren't creating gems or anything like that, just html/css/jquery stuff. I want to be able to set up a watch on the command line to auto-compile the css and reload the browser if possible. When we are ready for launch, we'd like to minify everything.
Right now if I try to start a new project with the latest version of Foundation, all the other projects get upgraded. And since some upgrades break certain things - I don't want that. Also if we have new people added, they have to install specific versions of everything. It seems like a package manager is needed.
But every time I read about some kind of package manager, it seems like I have to install something else: ruby, homebrew, rbenv, bundler plus the zurb-foundation gem itself. The more research I do, the more confused I get.
Can someone please make a recommendation of what is needed, where it needs to be installed and in what order?
For Foundation 4, you can use the bundler gem. There are instructions on how to set up a Gemfile and install a specific Foundation version in the F4 official docs.
For Foundation 5, it depends on how you are using it. If you are using bower, you can specific a specific version number in the bower.json file and run bower install or bower update.
There are a variety of other ways to handle this and things might be different if for example you are using Rails, but these are the two best ways that I know of to get a specific version of Foundation installed.
To continue...
8 - NOW you can install ruby using rbenv. I looked up the latest stable version of ruby and it's 2.1.1. Groovy.
$ rbenv install 2.1.1
$ rbenv rehash
Checking...
$ruby --version
I got:
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Seriously? Now what? Oops - it's that nutty path thing again. add this to .profile
# Initialize rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
Quit and restart terminal. Check again:
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin12.0]
Yaay! High fives! What was I doing again? Oh yeah - Foundation. Sigh.
9 - Go to http://foundation.zurb.com/docs/sass.html I already have Node.js installed - thank heaven - so now I install bower.
[sudo] npm install -g bower grunt-cli
10 - Now I install Foundation!
gem install foundation
But wait - there's more! That's 1.0.4. Should it be 5 something? Well no - that's the Foundation CLI.
11 - NOW I can create my project.
$ cd path/to/sites
$ foundation new MY_PROJECT
Now I finally have a project. Open in the browser....
I get an unstyled page:
Welcome to Foundation
We’re stoked you want to try Foundation!
To get going, this file (index.html) includes some basic styles you can modify, play around with, or totally destroy to get going.
Once you've exhausted the fun in this document, you should check out...
wah wah Well thanks ZURB! Yes I have exhausted the fun - but probably not in the way you intended.
12- Oh yeah - and bundler too so I can manage my old versions of Foundation
$ gem install bundler
So that's where I'm at. And all this so that updates are easier?
Was this ridiculously painful? You bet. And it's not like I'm exactly a noob here - I've done three sites with Foundation 4 - with and without compass - and one with Bootstrap.
Thanks ZURB - You guys may be geniuses but give the rest of us a break please!
It was a Magical Mystery Tour - and not in a good way - but I finally got it working. Thanks to Robert Anderson: http://blog.zerosharp.com/installing-ruby-with-homebrew-and-rbenv-on-mac-os-x-mountain-lion/
You are my hero! Although my experience started a bit further back...
Here's what I had to do:
1 - Update Xcode from the App store.
2 - Open and hit cmd-, and download command line tools.
2.5 - If you have the GitHub.app installed - uninstall it. It apparently interferes with command line operation, which really needs to be working for the rest of this.
3 - Install GIT. I'm using Mountain Lion and couldn't find an install package for that, but the snow leopard one worked. (http://sourceforge.net/projects/git-osx-installer/files/)
4 - Go to /usr/local
5 - Install Homebrew (http://brew.sh/) Do NOT use sudo.
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
Now check the install:
$ brew doctor
I got a warning about an unbrewed .pc file fuse.pc - Just a warning so moving on...
$ brew update
If everything is installed correctly, this should run without errors.
6 - NOW you need to update your path, if you haven't already. Create ~/.profile if it's not already there. Add:
homebrew=/usr/local/bin:/usr/local/sbin
export PATH=$homebrew:$PATH
After wrestling with this file for awhile, and researching $PATH, I ended up editing /etc/paths and putting /usr/local/bin at the top of the stack. I think learning how to set your path is one of the keys to getting this done.
7 - Now use Homebrew to install rbenv. rbenv lets you have more than one version of ruby running on your machine. You need this because OSX ships with an old version of ruby that isn't supported by F5. yaay.
$ brew install rbenv
$ brew install ruby-build

Upgrade ember-precompile without rails or grunt

I am writing an ember app, and not using rails nor grunt for anything. I previously had a short python program that took text files and did some markdown stuff with them, and then compiled them all to a templates.js file using ember-precompile:
ember-precompile templates/*.hbs -f templates/templates.js
This worked great until I upgraded ember, and now I'm getting this error.
Uncaught Template was precompiled with an older version of Handlebars than the current runtime.
Please update your precompiler to a newer version (>= 1.0.0) or downgrade your runtime to an older version (== 1.0.0-rc.3).
I need to upgrade my ember-precompile program, but solutions like changing a grunt config or changing gemfiles are no good for me, since I'm not using either of those tools.
Also, attempts to upgrade or reinstall haven't made any changes at all.
Ember version Version: v1.0.0
Last commit: e2ea0cf (2013-08-31 23:47:39 -0700)
Handlebars version Handlebars.VERSION = "1.0.0";
Feel free to fill in any gaps in my understanding. For short term development purposes I'm just going to put my templates in index.html but I want to do markdown stuff to my templates first, so that won't do forever.
You would need to recompile your handlebar files using the latest ember-precompile version that matches the run time version. Basically, ember-precompile that you are using is older version but you are currently running the newer version of ember. That is what the compliant is about.
Turns out I just needed to learn the magic of github and npm and download a non "release" version of the program and install it. Pretty stupid of me really.
If anyone in the future has this problem, just check out npm install and get one of the fixed versions from github in a zip file or whatever suits you.