In reference to the thread here : Clojurescript: Error: Could not find or load main class clojure.main
Where (in which directory) do we need to keep the clojure.jar? Should it be in the lein folder or in the folder where lein folder exists?
I am trying Clojure for the first time and have already spent a large amount of time in setting up Clojure and lein. But still facing the same error.
Open a project with lein
$ lein new myproject
$ cd myproject
There in src/<projectname>/core.clj
put your code - and from inside this myproject folder
start lein:
lein repl
It will run the core.clj code - and say sth like:
nREPL server started on port 46297 on host 127.0.0.1 - nrepl://127.0.0.1:46297
So you can connect with this repl from emacs using
M-x cider-connect and choose localhost and as port 46297 or whatever is given as port in that nREPL line!
Please see this template project for a good way to get started
https://github.com/io-tupelo/clj-template
Follow the instructions in the README file. An excerpt:
How to Use This Project
To use this project, we assume you have already installed Java, Clojure, and Leiningen, and git.
Clone the Project Using Git.
Verify you have Git installed:
> git --version
git version 2.25.0
Use git to clone the project (via SSH) into a new project names demo:
> git clone git#github.com:io-tupelo/clj-template.git demo # git ssh URL
or, clone via HTTPS (if you don’t have SSH set up on your computer & GitHub):
> git clone https://github.com/io-tupelo/clj-template.git demo # git https URL
Then cd (change directory) into the new project:
> cd demo
Verify you have Java, Clojure, and Leiningen set up correctly
Try the following commands, and make sure you get similar output:
> java --version
java 13 2019-09-17
Java(TM) SE Runtime Environment (build 13+33)
Java HotSpot(TM) 64-Bit Server VM (build 13+33, mixed mode, sharing)
> lein --version
Leiningen 2.9.1 on Java 13 Java HotSpot(TM) 64-Bit Server VM
....etc....
Related
We have x86 Jenkins running on Windows Server 2016. No issues with pull of repo over ssh, both for projects and with git plugin in the pipeline.
Now I would like to be able to execute a 'git diff' command after a fetch from origin. I installed the Jenkins plugin "sshagent" and am attempting to execute the git commands from that context. From that plugins page it appears I no longer need to use Tomcat Native Libraries (quote: As of 1.14 unnecessary if ssh-agent is installed)
My direct issue is the error "Check if ssh-agent is installed and in PATH". I would prefer not to use Tomcat version if possible. I suppose I am trying to understand why every search I do implies ssh-agent.exe should be part of git, but it is not in my 'bin' folder.
Open to other ways to accomplish the stated goal (execute git diff), including foregoing ssh connection to the git server, but that also looks to be not straightforward.
This ended up being fairly straightforward, ssh-agent.exe was in git/usr/bin not git/bin. adding it to path per Druta suggestion resolved
When I write jmeter in my terminal I have this error.
An error occurred: Unable to make field private static java.lang.String sun.awt.X11.XToolkit.awtAppClassName accessible: module java.desktop does not "opens sun.awt.X11" to unnamed module #4d3167f4
Download latest Oracle JRE or JDK and unpack it somewhere, i.e. to /opt/java folder
Download latest JMeter and unpack it to /opt/jmeter folder
Amend PATH environment variable to start with the "bin" folder of Oracle JDK installation like:
PATH=/opt/java/bin:$PATH && export PATH
In the same terminal window navigate to JMeter folder
pushd /opt/jmeter
Execute JMeter
./jmeter
More information: How to Get Started With JMeter: Part 1 - Installation & Test Plans
Check which version of Java you are running. I received this same error on another java application when I started using Java 9 EA. I downloaded jmeter just out of curiosity and get the same error.
I had this same issue installing openjdk-9-jre on
Ubuntu Gnome 17.04
installing the "older" Version via
sudo apt-get install openjdk-8-jre
worked for me right away.
https://wiki.ubuntuusers.de/Java/Installation/OpenJDK/
Is it possible to use the ADD and COPY commands in a Dockerfile on Mac OS X using boot2docker? If so, how? The naive just gives No such file or directory.
So, I've tried two things:
having the file in my local directory (same directory as the Dockerfile) on my Mac.
scping the file into a specific path on the boot2docker-vm and using ADD from that path.
Neither work.
Edit:
Plain vanilla Boot2Docker Mac OS X version 1.2 clean install.
Dockerfile:
FROM centos
ADD ./some.rpm /tmp/some.rpm
RUN rpm -Uvh /tmp/some.rpm
I've tried having some.rpm in the same directory as the Dockerfile, I've tried having it in /home/docker in the boot2docker-vm image, I've tried changing ./some.rpm to /home/docker/some.rpm, etc.
For using "ADD" in a dockerfile you need two things:
First: a directory with your structure
for example:
./my_docker_dir/some.rpm
Second: a valid Dockerfile in my_docker_dir (it has to be named 'Dockerfile')
Your line: 'ADD ./some.rpm /tmp/some.rpm' will work
With that prepared you can build your container with 'docker build -t whatever/youwant .'
For more Information read https://docker.readthedocs.org/en/v0.6.3/commandline/command/build/
I believe you should omit the ./, so if some.rpm is in the same folder as your Dockerfile, try
ADD some.rpm /tmp/some.rpm
If the file is in a sub-folder called files next to your Dockerfile, you can do
ADD files/some.rpm /tmp/some.rpm
I made a simple test case for which it works.
Here is the version info for my setup:
$ boot2docker version
Boot2Docker-cli version: v1.4.1
Git commit: 43241cb
$ docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.4
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
Here is the test case that you can copy-pasta into your terminal:
date > foo.txt
cat > Dockerfile <<EOF
from centos
ADD foo.txt /datefile.txt
EOF
docker build -t addtest .
docker run -i -t addtest /bin/cat /datefile.txt
It even works if you use the /tmp directory, though I suggest against it since that is supposed to be wiped out on every boot.
I want to use Jenkins for creating RPM packages to deploy code and scripts onto a Linux redhat machine(s)
So the applications are a mix of technologies (no compiling needed) i just need to package up the applications deploy them to the correct location restart apache
Would anybody have some instructions on how to do these steps for a total Newbie:
Some questions:
Do i need to install jenkins on a local linux machine if im going to be creating RPM's that will be deployed on to linux redhat machine (i was hoping to install jenkins on windows)
Does anybody have a example of creating a package out of a local folder (no source control for the moment)
I want to just specify the directory of where to take the code from and specify where to deploy the code to on a machine the rpm is installed on
On the destination machine i want to run something like
yum -install mypackage-version12.rpm
and it will install the code/scripts to the specified directory and restart apache
i need an example of this also.
Thanks
You can install Jenkins on a different machine, but you generally must have a Jenkins "node", "slave", "agent" installed on a machine that can generate RPM packages.
Running each step of the RPM package setup is putting all the steps to build within Jenkins. It works much better if you extend your build system to build the RPM, and have Jenkins do what it does best, manage the build (schedule, etc), not micro-manage the build (do the steps).
Depending on what you currently have as your build system, this might include ant directives to setup the rpm build tree, copy in the .spec file, and a executable call to rpmbuild.
Jenkins can easily call a post-build task to do this, or you might want to configure a mini "fake" project that does the update, depending on tastes.
As an aside, for a yum command to work without using the --localinstall option, you will need to have a web server set up, the new RPM copied to the right folder on the web server, and the indexing files rebuilt (repobuild is the script to do so, if I recall correctly).
On the client machine (where the package will be installed), you will need to have a yum configuration that directs the client machine to include the web server as one of the known yum repositories.
Why not use an Docker images to build the RPM inside it though a dedicated stage ?
Your code needs to provide /rpm/SPEC files and inside the Docker (Jenkins) you can have a Jenkinsfile like :
mkdir -p ./rpm/BUILD && cd ./rpm/ && for f in ./SPECS/*; do rpmbuild --define \"_topdir \$(pwd)/\" --define \"_builddir \$(pwd)/BUILD\" -bb \$f;
And you are done.
I'm migrating an SVN repository over to Git. The git-svn command doesn't handle the branches and tags properly but I stumbled across a tool called svn2git which seems to resolve this (https://github.com/nirvdrum/svn2git).
I've tried setting up this tool to work on Windows but I've not had much success.
I started off by copying the svn2git installation to C:\svn2git and downloading Ruby for Windows (http://rubyinstaller.org/) and saved it at C:\Ruby193.
Running svn2git came back with
/bin/env: ruby: No such file or directory
I then copied Ruby's bin and lib folders to svn2git's bin and lib folders respectively.
Running the svn2git then came back with
<internal:gem_prelude>:1:in `require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in `<compiled>'
Does anyone know how to get this working on Windows environment? Thanks
Obviously, rubygems.rb is missing. Install it as documented here:
https://rubygems.org/pages/download
Then, install svn2git as instructed here:
https://github.com/nirvdrum/svn2git
After that, everything shall be fine.
I'd suggest you to try SubGit tool. It does translate Subversion tags as tags and works well on Windows (requires Java 5 or newer). SubGit is ready to use. You may get latest build at download page and read documentation on the web site.
Originally in 2012 early SubGit versions required local access to Subversion repository (over file system) but later on (by 2015) on network access to subversion was added.
Disclaimer: I'm SubGit developer.
If all you want to migrate from SVN is the trunk and it's commit history, you can easily do it with the following git commands:
git svn init --prefix=svn/ --no-metadata --trunk=http://[svnHostName]/svn/[projectTrunkUrl] --no-minimize-url
git svn fetch --log-window-size=4000
Tadahhh! You have initialized your local git repository with all your SVN trunk repository history!
Now you probably want to add a default remote and push:
https://help.github.com/en/articles/adding-a-remote
https://help.github.com/en/articles/pushing-to-a-remote