I have a problem with my Gitlab. After the installation it has no Layout.
When i try
bundle exec rake assets:precompile RAILS_ENV=production
It outputs
Could not locate Gemfile or .bundle/ directory
Gitlab is running on Debian with Apache. nginx is disabled.
from your directory run the following command
bundle install
if you see permission error the try above with command by appending "sudo"
You need to install rails app first then you can compile it's assets.
Related
When using the NodeJS tool on a slave that is configured with a global package, the following error is given:
env: can't execute 'node': No such file or directory
If the build runs on an executor in master, there is no error and the package is installed as expected.
I am using the kubernetes plugin with jenkins/jnlp-slave:3.27-1 as the slave image.
Jenkins Version: 2.164.2
Kubernetes Plugin: 1.14.9
NodeJS Plugin: 1.2.9
Note: This is not a duplicate of Jenkins - env: ‘node’: No such file or directory as I am not using the alpine image as was the problem in that question.
Same issue on my Jenkins.
The "download from nodejs.org" installer extracts the node package into a local directory.
It will then run "npm install -g" for each of the packages listed in the "Global npm packages to install" field in the NodeJS installer configuration ("Global tool configuration").
However, it does that before setting the system PATH to the directory where it extracted node, so npm will not find node.
I'm convinced that's a bug in the NodeJS Jenkins plugin. Your options are, as agusluc said, creating a custom jnlp-slave image (which is what I did), or file a bug with the developer of the plugin and hope it will be fixed.
I am trying to run webdriverio test from jenkins and following this . I installed nodeJS plugin for jenkins and under global tool config, for NodeJS , added a name and installation directory as /usr/local/bin (node executable is in this folder)
In Jenkins, in project config , under build environment, I have checked
Provide Node & npm bin/ folder to PATH and chosen the node installation name from previous step
But when I am trying to run npm install
npm test ,by adding these commands under execute shell under Build and building it, I receive this error
Building in workspace /Users/Shared/Jenkins/Home/workspace/wdio-project
[wdio-project] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh
+ npm install
/Users/Shared/Jenkins/tmp/hudson1478028169114509075.sh: line 2: npm: command not found
Build step 'Execute shell' marked build as failure
Finished: FAILURE
In case someone is looking for same issue, I resolved the above error by adding export PATH=/usr/local/bin to the execute shell under build. This post helped me
There is currently a bug opened about this (JENKINS-26583 and JENKINS-27170)
I could workaround this bug by adding explicitly node on the PATH by adding this line :
export PATH=$PATH:/home/jenkins/.jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/node_js/bin/
I had just fixed the same issue as you did.
I wonder if my fix would also help you. When I was using the alpine-based docker image, the Jenkins can never find the npm, but when I use the debian-based docker image, problem solved immediately.
Try this export PATH=/usr/local/bin:$PATH
After installation of NodeJS restart pc
In my case this worked -
export PATH=$PATH:/usr/local/bin
Problem
I created a project where configure a server in DigitalOcean with Apache and Git.
For init project on server, I run the following command:
cd /var/repo
mkdir project-example.git && cd project-example.git
git init --bare
I set up file post-receive with this code:
#!/bin/bash
git --work-tree=/var/temp/project-example --git-dir=/var/repo/project-example.git checkout -f
cd /var/temp/project-example
npm install
npm run build
rm -rf /var/www/project-example/*
mv -f /var/temp/project-example/build/* /var/www/project-example/
When I make a push to server remote via git on machine local, occurs followings errors:
remote: hooks/post-receive: line 4: npm: command not found
remote: hooks/post-receive: line 5: npm: command not found
However, accessing server via SSH and execute command:
# it works standard
cd /var/repo/project-example.git
source hooks/post-receive
Comments
System Server: Ubuntu 14.04
I installed node via nvm.
When a git hook runs, it does not necessarily have the same PATH variable set as when you log in via SSH. Try putting the full path to npm in your script when you call it; that should fix things.
UPDATE (June 7 2019):
A couple of commenters had issues with node not being found when using the above solution, which made me realize it is not very robust. Rather than put the path in the call to npm itself, you'd be better off adding the necessary path to the script's environment, e.g. if npm (and node) happen to be in /usr/bin/, add the following to your script before calling npm:
export PATH=$PATH:/usr/bin
In fact, a more robust way to make sure the hook works the same as it does when you are logged in via SSH is to find out what the path is when you are logged in (i.e. the output of echo $PATH) and set the path in your hook script accordingly (of course you may need to omit some user-specific paths, etc.)
I am using the Eb Command Line Interface to deploy a node.js project to AWS Elastic Beanstalk. I am using git for version control. So the command I run to deploy is simply 'git aws.push'.
Locally, I am using grunt to compile css files from less files and also minify and cmobine js files.
I don't want to include the *.min.css files or *.min.js files in my git repository but would rather have them recompiled on AWS after deployment.
Is there a way to do this? Maybe with a .ebextensions hook or something?
I am not familiar with grunt, but I guess what you would have to do is install nodejs and grunt on elastic beanstalk and then running your grunt commands once the container is set up.
In a ebextensions hook such as .ebextensions/grunt.config you could do the following :
commands:
01-install-nodejs-npm:
command: "yum install -y --enablerepo=epel nodejs npm"
02-install-grunt:
command: "npm install -g grunt-cli"
container_commands:
01-compilecss-minifyjs:
command: "grunt build mytask"
leader_only: true
The commands would make sure nodejs, npm and grunt are installed. The container_commands are executed from within your repository's home directory, so the "source" files for your grunt build should be available from there.
Again - I don't work with grunt and can't tell if this would actually work, but I hope it helps anyway.
I'm trying to create a new project in 6.0. Gitlab says that repository was created successfully, but there is no repository created.
I was able to create project with repositories before. Suddenly these newly created repositories are not published on server.
Any help is highly appreciated!
Please switch in your gitlab install directory and run these commands to check your installation. Maybe something is not running:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production