Hello,
I'm also having trouble getting started with scalatra and intellij. �I'm coming from the microsoft world of .NET, and making the jump to scala has been challenging. �I feel like I could start learning much more quickly if I managed to setup the IDE as lean as possible, so I don't get confused with extraneous libraries and/or concepts until I'm ready for them. This is what I've accomplished so far:
- Install Xcode - Developer Tools from the app store
- Open Xcode, agree to terms, and install Command Line Tools in Preferences -> Downloads
- Install homebrew, then use it to install scala
- open terminal, run the following command:
- ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- type the follow commands:
brew doctor (this ensures homebrew is setup correctly)
brew install scala (this will install scala to /usr/local/Cellar/scala/2.10.1)- Install Java JDK 7
- Install Intellij IDEA Ultimate
- For a lean installation:
disable all VCS integration plugins except for: Git
- disable all Web/JavaEE Tech plugins�
disable all HTML/Javascript Plugins except for: CSS, HTML Tools, Inspection-JS, JavaScript Debugger, JavaScript Intention Power Pack, JavaScript, LESS, SASS
disable Other plugins except for: CoffeeScript, Github
- Install the IntelliJ Scala plugin
- Open Intellij, and go to Configure -> Plugins -> Browse Repositories
- Choose the Scala plugin, hit ok and restart the application
- Create new scala project
- Select �Scala Module�
- Give it a name and location
- Under project SDK, if <None> is selected, go to New... and choose folder /Library/Java/JavaVirtualMachines/jdk1.7.0.jdk
- Set Scala Home to /usr/local/Cellar/scala/2.10.1/libexec
This has gotten me to a point where i can add classes and objects to the project, and compile/run code successfully. �But how do I now take this project and get scalatra integrated? �Do I still use giter8 to generate scalatra? �How would that be injected into my project? �The tutorials I've seen have been written before IntelliJ started using SBT as an external compiler, so I'm not sure which portions of the giter8 template is redundant to the intellij scala project i've already setup. �Also, where exactly does the gen-idea plugin come in? �There really isn't that much explanation on github as to what it does or how it helps.
--Sam
On Friday, May 10, 2013 3:30:40 AM UTC-4, Ali Makki wrote:
Hello Ebot
Did itellij prompt you to restart your IDE after running gen-idea?�
The location of the idea project file should be in the same directory where your scalatra project is setup.
Ali
On Thursday, May 9, 2013 4:58:38 PM UTC+4, Ebot Tabi wrote:
Hi Ali
i added the sbt-idea on the plugin.sbt file and did the sbt gen-idea and still came up with the errors.
On Thursday, May 9, 2013 1:09:59 PM UTC+1, Ali Makki wrote:
Perhaps you haven't added the scalatra libraries to your project's classpath, hence the errors.
Check out the gen-idea plugin for sbt, which generates intellij project files for you�https://github.com/mpeltonen/sbt-idea
Once you have it configured in sbt all you do is run: sbt gen-idea; idea projects are generated for you and all dependencies listed in your build file will be set up in intellij.
Good luck!
On Thursday, May 9, 2013 2:49:58 PM UTC+4, Ebot Tabi wrote:Hi therei am new to scalatra, recently i had scalatra setup successfully on my system, and i added the plugin for IntelliJ and did the build with sbt but when i load the project on IntelliJ via importing it, i get errors on scalatra package imports. I will be grateful for advice and help.
Ebot
--
You received this message because you are subscribed to the Google Groups "scalatra-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalatra-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
�
�