I am using Homebrew with the command brew install leiningen but trying lein repl gives
java.lang.ClassCastException: java.lang.Character cannot be cast to java.uti
l.Map$Entr
followed by many pages ending with
clojure.main.main (main.java:37)
the same happens with Macports or supplied script, boot installs perfectly with Homebrew.
I am learning Clojure from the Brave and True book which needs lein repl
To "install" lein just download the download script from the web page and run it :
https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
Hope it helps
Consider using sdkman, even if leiningen is straightforward to use:
curl -s "https://get.sdkman.io" | bash
Then open a new terminal and type:
sdk install leiningen
Now try your:
lein repl
While you're at it, sdk can be used to manage your Java installations. Never again worry about dirtying your system with various versions, as they all go in your home directory, cleanly.
Related
I'm trying to build a project that uses leiningen -- though my issue seems to be with leiningen and not with the project.
When I run lein figwheel dev (for a project that has a /dev folder configured correctly) I get the following:
Figwheel: Cutting some fruit, just a sec ...
Unrecognized option: --add-modules
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Which indicates it's an error with the JVM, but I'm not familiar enough with working with any of JVM / clojure / lein to know what I should be doing to fix it.
Some (hopefully!) helpful information about my stack:
$ java --version
openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Debian-2)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Debian-2, mixed mode, sharing)
$ lein --version
Leiningen 2.8.1 on Java 1.8.0_171 OpenJDK 64-Bit Server VM
Clone this repo and see if it solves your problems: https://github.com/cloojure/cljs-template
Be sure to read the README.txt file and follow the instructions.
For this project, all you need is:
> lein figwheel
I'm not sure what you have in your ./dev folder - that's probably the problem.
I'm trying to install Leiningen on Windows 7. Here is my steps:
Step 1. Download:
cd C:\application_bin\
git clone git#github.com:technomancy/leiningen.git
Step 2. Add C:\application_bin\leiningen\bin to system path.
Step 3. Run:
PS C:\Users\Nick> lein repl
Leiningen is missing its dependencies.
Please run "lein bootstrap" in the leiningen-core/ directory
with a stable release of Leiningen. See CONTRIBUTING.md for details.
I don't know what is missing, so I follow the instruction from this error message:
cd C:\application_bin\leiningen\leiningen-core
lein bootstrap
Leiningen is missing its dependencies.
Please run "lein bootstrap" in the leiningen-core/ directory
with a stable release of Leiningen. See CONTRIBUTING.md for details.
The error comes back again. What's wrong with my installation steps? What dependencies are missing?
I've found the solution here:
http://onoffswitch.net/installing-leinigen-windows/
The problem is caused by a maual wget installation on Windows. The lein.bat checks wheter wget, curl exist, and whether in powershell (in which case it creates a .net webclient and downloads the target file).
Solution:
Remove wget. or
Change the order of the powershell, wget section in lein.bat. (details in the aforementioned link.)
I'd like to get this running (https://github.com/maitria/avi), which recommends using
sudo lein install
But lein doesn't act like an ordinary command -- I get
sudo: lein: command not found.
There only seem to be three subcommands that run into permissions problems and I considered doing them manually, but they're fairly gnarly string-interpolated arguments to the C compiler and my chances of not making a mistake seem pretty small.
So leiningen is not your typical command. Its a tool built in Clojure and is used to manage clojure applications much like rake works for Ruby. These 3 steps should help you
Download the lien script from the leiningen home page and place it in a location that is part of your PATH.
2.Run lein in the command-line and it will install it dependencies, though you will need to make sure you preinstalled JDK
3.Run lein install in the location of your code
I know it is possible to use CounterClockwise inside Eclipse, but I have been trying to get Leiningen to work so that I could use ClojureScript.
I downloaded leiningen using git clone. It then says run the script. I have tried lein self-install from inside PowerShell and inside the git bash environment.
In each I get an error about failing to download leiningen (which I thought I had with the git clone? hmm). It is interesting because one reads instructions that include things that don't make sense to Windows.
For example, inside Powershell, Windows doesn't understand export HTTP_CLIENT. It was only inside the git bash that I got a message that it is possible my HTTP client's certificate store does not have the correct certificate authority.
It then suggests this command, which runs ok, export HTTP_CLIENT="curl --insecure -f -L -o"
but it doesn't fix the problem.
The most recommended method AFAIK is to download the script lein.bat and putting it on the PATH environment variable. I've tested this method on several systems (XP, Windows 7). There is no need to build leiningen from a git checkout yourself. If you have a Windows with Powershell installed lein self-install should download the core .jar file inside a directory .lein in your user directory. Else, make sure you install either wget.exe or curl.exe and put it on the PATH.
There is an installer for Leiningen on Windows. You just need to install Java SE 7 JDK and Leiningen for Windows. This page has detailed instructions with screen shots: http://leiningen-win-installer.djpowell.net/
Leiningen for Windows creates a PATH variable and Clojure REPL shortcut among other things. From the REPL you can create, build, and automate your Clojure project.
I'm a Windows user. I tried to install django-1.0.2 final through the command prompt and it kept giving me an error in line 70:
The error occured where u"SVN"... It couldn't get past that line.
What to do in order to be able to install django-1.0.2?
You do not have SubVersion installed on your machine. You are trying to synchronize from the current production stream via SubVersion, which is a source control system, which you do not have installed.
Easiest solution - download the latest official version per the instructions at http://www.djangoproject.com/download/
Please install a client for the Subversion Version Control System. Since you are on Windows, you can also use TortoiseSVN which is an easy to use SVN client for Windows.
Alternately, you can download the tarball of Django 1.0.2 directly.
And please don't SHOUT on Internet forums. We hear you :)
If I recall correctly, installing TortoiseSVN won't help you there cause Django's code tries to use SVN's command line version.
Install a command-line SVN like:
Slik SVN
CollabNet SVN Command line
What version of python are you using? I had the same error when installing on top of python 3.2 instead of 2.7. Django only works with 2.7.
http://docs.djangoproject.com/en/1.2/faq/install/#can-i-use-django-with-python-3