rbenv with hook - rbenv

I'm a totally new to ruby and rbenv, but I'm trying to get this 'bwoken' app working with rbenv.
This is bwoken, it's for iOS UIAutomation testing:
https://github.com/bendyworks/bwoken
My question is how do I add hooks for rbenv?
It says:
Ensure your after_cd_bundler rvm hook is enabled:
$ chmod u+x ~/.rvm/hooks/after_cd_bundler
Then, add the following line to your Rakefile:
Ok, so I see comments in the version history here
https://github.com/sstephenson/rbenv
saying this:
Added /usr/lib/rbenv/hooks to the plugin hook search path.
Added /usr/local/etc/rbenv.d to the list of directories searched for rbenv hooks.
The problem is what is the original default place for adding the hook? They don't mention it anywhere. Where is the correct place to put it?

For rbenv you'd have to use a dot (.) file like .rbenv_version. The plugin talks configuration in a rvm context. Both are different ways of having multiple ruby version on the same system.

Related

React Native Xcode 13.2 Error no such file or directory for NativeVibration.js

After creating the project with react-native init, i found this issue in terminal as well as in xcode. After digging deep, i found that this particular file is showing missing in project node modules.
Here are example of error codes showing in xcode & terminal-
Error: ENOENT: no such file or directory,
/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js
I've learned the hard way when programming in react native (for cross platform/hybrid application development), many unknown issues will be caused if you deviate from native OS clustering. Make sure you don't make the same mistakes as I have.
I have more specific help for you, apart from the obi wan style in my previously semi-answer.
Another guy had an issue with this a few years back, he asked and was answered,"delete your node_modules and app from simulator. Then re-install everything back, clear cache and see if it start bundler from root directory.
Before doing that, you can try 'react-native start' from your root directory.
I have seen that error message a lot, specifically with jest. But that's a different fix. I realize you are not using jest to test your reactjs, but it is jest tests runner that is the problem that causes the same outcome as you have come to- solution there is to disable the jest runner from running in the background while installing new packages.
I wonder if there isn't a similar solution here - only applicable to xcode - although you see it in terminal, that's probably just the cmdline not recognizing the path to the directory or at least that file.
Should be easy to figure out with terminal--
Go to $HOME~ type dir or ls, to see your directory folders, if you see the project listed, cd into it or, just search for the directory apt-get search [package] or apt, pkg, pip, pacman, snap etc etc whatever your flavor if OS terminal is, or search for the file-- $find / -iname [query] or even search for all paths containing the phrase: $locate [query]... If you created it, it exists. Just because xcode can't find it, and initial attempts in term produced nada, don't believe it is not in your system. just a matter of where, what, and why a process or dependancy is missing or malfunctioning in attempt to retrieve the file & open it.
You can definitely find it - i don't know jack about xcode, but terminal -- I can get anything from anywhere on cmdline-- you can too. I have to go, but I'm curious if you have figured it out. Let us know yeah? Best of luck to you. Cheers QwaziRidwanhasib.
-Cujo

Install kartik/yii-grid without updating other widget

I want to use kartik yii-grid to make editable grid. But when i am trying to install it though composer using following command
php composer.phar require kartik-v/yii2-grid "#dev"
But it will update so many thing from my vendor also even yii2 framework bootstrap. Can any one suggest me to install this widget without effecting my other vendor stuff?
Add:
"kartik-v/yii2-grid": "#dev"
to the require section of your composer.json file.
Then run:
php composer.phar update kartik-v/yii2-grid
Installing or updating a single dependency is outlined in composers documentation here.
https://getcomposer.org/doc/01-basic-usage.md#package-versions
Composer installs what is specified in composer.json file. If you want all of the dependencies are never updated - in composer.json specify the exact version of the package, then the composer would never try to update it.
So that you are trying to bypass the upgrade of packages during the installation - this is a bad decision, you should have the right composer.json, rather than trying to deceive composer
=====
Also from https://getcomposer.org/doc/03-cli.md#require
You may help --no-update key, but I'm not sure

Trying to add another service to the meteor accounts package

I've found this on github that shows how to add github login to the accounts. https://github.com/Jabbslad/accounts-github
Instead of installing the package with "mrt add accounts-github", I'm downloading the sources, and trying to make them work with a simple app. The goal of this is to make a few changes to the code to understand how it works and finally make my own extension to accounts.
But I get errors "Cannot read property 'github' of undefined at app/accounts-github/github_common.js:1:36".
Thx for your help.
Because you added the package yourself you need to ensure the dependencies are also installed. You can find the dependencies in package.js
If you want to make the package from scratch ensure you also use a package in your meteor app. This means that you put your stuff in a directory called accounts-github in a directory called packages in the root directory of your meteor app.
You can also add these dependencies in yourself if you don't want to use a package:
meteor add accounts-base
meteor add accounts-oauth2-helper
meteor add http
Some dependencies should be in with meteor (i.e templating)
So the problem was the git for accounts-github was not updated with the latest evolutions from meteor. So I replaced "Meteor.accounts" with "Accounts" in all files and now it works.

How to install play! framework modules?

I'm trying to install this pagination module for my Play! application, but can't get it to work. I've extracted the zip file inside /play/modules/paginate-head/ and I an example here on SO, to change my dependencies.yml file into:
# Application dependencies
require:
- play
- pagination -> paginate-head
repositories:
- My modules:
type: local
artifact: ${application.path}/../[module]
contains:
- paginate-head
But I still don't think the module is being loaded. I'm assuming it's documentation should appear on http://localhost:9000/#documentation/home or are there other ways to see if a module was loaded? It's not telling me anything in the console neither.
Any ideas how to get this installed?
You don't need to extract a zip file, just running the command
play install paginate-head
should work fine. But unzipping will also work. You also don't need that "repositories" section in your dependencies.yml file. Play! knows where to find modules.
The real issue is that your require should look like this:
require:
- play
- play -> paginate head
Notice play to the left of the '->' which signifies that it's a module. Also no dash between 'paginate' and 'head'. That's because 'paginate' is the module name and 'head' is the version and these should be separated by a space.
Also, for modules that are hosted in the main Play! modules repo, you don't even have to install them. You can just add the require above and start Play! and it will install it automatically. Though it will install under the applications modules directory, not the play modules directory.
Hope that helps!

Change TextMate live webpreview to use Chrome's Webkit

Currently Textmate uses Safari's Webkit to render the hmlt outputs for both commands and the live webpreview window.
Unfortunately for one specific project I am working with specific javascript API supported only be Firefox's gecko or Chrome's Webkit, it seems Safari still not supporting it.
Perhaps there's a way to globally change Safari for Chromium or Webkit Nightly?
A support member of TextMate kindly answered my email asking for it by mentioning this url which definitely points to the right solution. I really didn't think it could be done so seamlessly and now I am very happy that it is possible.
Basically there are few steps to follow:
$ cd /Applications/TextMate.app/Contents/MacOS/
$ mv TextMate _TextMate
$ vim TextMate
new TextMate file contains (note that you might want to change the path for the new webkit framework to fit the one you like)
#!/bin/bash
env DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6/WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES /Applications/TextMate.app/Contents/MacOS/_TextMate
after saving the newly created file:
$ chmod a+x TextMate
Close/Run TextMate :)
Or obvious if you just want to do this for each session you can simply use the bash command right away from terminal like this:
$ env DYLD_FRAMEWORK_PATH=/Applications/WebKit.app/Contents/Frameworks/10.6/ WEBKIT_UNSET_DYLD_FRAMEWORK_PATH=YES /Applications/TextMate.app/Contents/MacOS/TextMate
This is really cool...one thing I've noticed after that is that my themes are no longer being displayed, have no clue about it but I will try to check the cause.
try this - http://wiki.macromates.com/Main/Howtos#SafariPreview