go install revel cmd after dep ensure not work - revel

I want to solve a problem about vendoring.
After dep ensure, the packages are installed under the vendor folder
But go install github.com/revel/cmd/revel doens't work unlike the revel document says
Of course, the Gopkg.toml includes it and the package exists under the vendor folder.
I think this is related to GOPATH. There is no way to search for packages under the vendor on CLI.
How can I handle it?
go install github.com/revel/cmd/revel
Error message :
can't load package: package github.com/revel/cmd/revel: cannot find package "github.com/revel/cmd/revel" in any of:
C:\Go\src\github.com\revel\cmd\revel (from $GOROOT)
C:\GoCode\src\github.com\revel\cmd\revel (from $GOPATH)

Confirm dep in installed
go get -u github.com/golang/dep/cmd/dep
Make sure inside your gopkg.toml you got
require =[
...
"github.com/revel/revel",
...
]
Then
GO111MODULE=off dep ensure
GO111MODULE=off revel run

Related

How to verify alpine packages before installing them?

This PR shows that functionally exists but I am missing commands verify package

Install Racket package only if not installed

I can install a Racket package with:
raco pkg install <pkg-name>
If the package is not installed, it installs it. If the package is already installed however, it will complain that the package is already installed. While this is fine, is there a better way to check if a package is installed, and only try to install it if its not already installed?
For context, I want this because I have a (non-package) Racket project that relies on certain packages being installed. I could put them in an info.rkt file, but as far as I can tell, these won't get installed unless I try to install the project as a package, which doesn't make sense for this domain.
So, is there anyway to determine if a Racket package is installed? Additionally, can I use this information to only install a package if its not already installed?
Yes, in fact you can. If you are using a shell program or makefile (basically, using the raco pkg tool from the command line), you can pass it the --skip-installed parameter. This will only try to install the package if its not already installed. So you could do something like this in a mace file:
all: # Replace spaces here with tabs, because make...
raco pkg install --skip-installed <important-pkg>
<rest-of-makefile>
Alternatively, if you are looking for an 'in Racket' solution, you can use the installed-pkg-table function to get a hash table containing all of the installed packages. From there, its easy enough to do a hash-has-key? to see if the package is in the table. From there, you can use pkg-install-command to install the package. Your total code will look something like this:
(unless (hash-has-key? (installed-pkg-table) "<important-pkg>")
(pkg-install-command #:deps 'search-auto i))
I should note that there is a slight chance that the package database will change between searching for the key and installing the package. If that is important to you, check out with-pkg-lock

Error arose when using Pkg.add() in Julia

I have a problem when trying to add a package in the terminal using Pkg.add, the terminal gives me the following error message:
fatal:your current branch 'master' does not have any commits yet
Error: failed process: Process(`git' --git-dir=````)
How do I fix it?
I've had the same issue with Gadfly. Installation failed and I couldn't load nor reinstall the package.
After looking at the documentation.
Turns out there is a cache folder (with the same name as the package) hidden in Users\my_username\.julia\v0.4\.cache\ I removed this folder and the package installed fine from Julia running Pkg.add("Gadfly").
Try removing the folder and install the package again.
Please give more information about where this package comes from. Github? Your hard drive? A zip file?
If this is one of your packages, just create a commit.
git add .
git commit -m 'First commit'
This should work.

Composer packages update but don't install

After doing
sudo php composer.phar update
I get the following:
Loading composer repositories with package information
Updating dependencies (including require-dev)
Installing SOME_PACKAGE (dev-master 6fb0f62)
Cloning SOME_TOKEN
Writing lock file Generating autoload filesUpdating
But when I do sudo php composer.phar install I get
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Does someone have any idea on what might be happening? I have a composer.json, composer.phar and composer.lock all in the same folder.
What is wrong in your opinion? With composer update, composer tries to find new versions of the packages within the specified version range. When found, it updates the package. At the end, it creates a composer.lock file with all packages and details about the installed versions.
composer install only reads this composer.lock file and installs exactly the versions specified in this. Since you already have the versions specified in that lock file, nothing will happen.
composer install is very usefull on production servers and in teams, as you'll be sure you all are using exact the same version of the dependencies.
Check if composer.look is using a package that uses an extension not released in php.ini . After releasing the extensions use comoser install

Modx configuration problem

I've installed Modx on mij webaccount. if i want to install packages i've got errors when installing.
Downloading of the packages is working. When i want to install ik get this error:
Could not transfer package wayfinder-2.3.0-pl.transport.zip to /var/www/vhosts/**/httpdocspackages/.
Could not install package with signature: wayfinder-2.3.0-pl
I tried to create the directory by hand and give it permission 777, this also not working. I think it's a configuration propertie because it's also with other packages.
That directory, /var/www/vhosts/**/httpdocspackages/ seems wrong.
Where did you install MODX? Where is your Core directory?
MODX will try to put packages into your core/packages directory, but something seems to be wrong in travelling to that path.

Resources