I'm on Windows 10 x64 and I've installed JRuby 1.7.8 (I tried the files for x64 and 32bits with the same problem) and JRE 7.
I was trying to have my Cucumber Test Framework running on a different machine. I downloaded my current branch (which is working fine in other computers, with all the settings: env.rb, Gemfile, etc) and then I installed successfully these 2 gems:
gem install bundler
gem install cucumber
The Gemfile I have contains loads of gems, similar to:
source 'https://rubygems.org'
gem "httpclient"
gem "watir-webdriver"
but when I execute:
bundle install
I just get this line and nothing gets installed, it finishes almost immediately. No Gemfile.lock is created, etc.
D:\project>bundle install
io/console not supported; tty will not be manipulated
D:\project>
Any idea what could be wrong and what I could try please?
Not quite sure if the issue has anything to do with the line above (which I had never seen in the other machines that are working). If it's not related and you've got an idea about both problems, please let me know and I'll have a look as well...
I've been trying for a few more hours and still not success, adding further info in case someone can spot something pls. Even 'bundle -v' doesn't work on this machine?!
D:\project>gem list
io/console not supported; tty will not be manipulated
*** LOCAL GEMS ***
builder (3.2.2)
bundler (1.13.2)
cucumber (2.4.0)
cucumber-core (1.5.0)
cucumber-wire (0.0.1)
diff-lcs (1.2.5)
gherkin (4.0.0)
jruby-win32ole (0.8.5)
multi_json (1.12.1)
multi_test (0.1.2)
rake (10.1.0)
D:\project>bundle -v
io/console not supported; tty will not be manipulated
D:\project>
Cheers!!
You have the latest version of bundler 1.13.2 installed and I have seen it cause different types of issues depending on the jruby version and some other gems. Bundler 1.10.6 works everytime for my Jruby 1.7.x.
Try these:
gem uninstall bundler
and
gem install bundler -v 1.10.6
Although I am not particularly familiar with jruby, it appears to be a bug, which is resolved in JRuby 1.7.24.
I would verify that the other computers this is working on are still on that version of jruby (assuming they are windows boxes).
I got this error when installing active admin on Rails 4
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
meta_search (>= 1.1.0.pre) ruby depends on
actionpack (~> 3.1.0.alpha) ruby
rails (= 4.0.0.rc1) ruby depends on
actionpack (4.0.0.rc1)
I follow this instruction:
http://www.activeadmin.info/docs/documentation.html
Anyone help please.
Apr 20, 2015 update
For Rails 4 (according to the official github page) use either master:
gem 'activeadmin', github: 'activeadmin'
Or rubygems:
gem 'activeadmin', '~> 1.0.0.pre1'
Feb 14, 2015 update
For Rails 4 (according to the official github page) use:
gem 'activeadmin', github: 'activeadmin'
Sept 4, 2014 update
For Rails 4.0 and 4.1 (according to the official github page) use:
gem 'activeadmin', github: 'activeadmin'
April 24, 2014 update
For Rails 4.1 and 4.0 use master:
gem 'activeadmin', github: 'gregbell/active_admin'
April 13, 2014 update
For Rails 4.1 use master and the following dependency branches:
gem 'activeadmin', github: 'gregbell/active_admin'
gem 'polyamorous', github: 'activerecord-hackery/polyamorous'
gem 'ransack', github: 'activerecord-hackery/ransack'
gem 'formtastic', github: 'justinfrench/formtastic'
For Rails 4.0.X just use master and you should be good to go:
gem 'activeadmin', github: 'gregbell/active_admin'
Note: There's an issue with adding comments to the index page in Rails 4.1. This issue is being tracked here.
September 29, 2013 update
The Rails 4 branch has been merged into master. Now all you need to do is specify:
gem 'activeadmin', github: 'gregbell/active_admin'
August 28, 2013 Updated answer
Was able to build a new rails 4 app up and running with AA just using:
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
Please disregard the older answer. Just add this line to your new rails 4 app Gemfile, run bundle install, run rails g active_admin:install, run rake db:migrate, run bundle exec rails s, go to /admin, and log in with admin#example.com/password and you're good to go! See ActiveAdmin Documentation for more details.
June 30, 2013 Updated answer
Much progress has been made on getting ActiveAdmin and the gems it depends on ready for Rails 4. Please use the following gemfile settings and disregard the bit regarding downgrading jquery-rails to 2.3.0:
gem 'devise', github: 'plataformatec/devise'
gem 'responders', github: 'plataformatec/responders'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'ransack', github: 'ernie/ransack'
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
gem 'formtastic', github: 'justinfrench/formtastic'
just bundle install (or bundle update, if necessary) and run rails generate active_admin:install (if necessary) to install
Original Answer
I used the following to get ActiveAdmin on my Rails 4.0.0.rc1/JRuby/Puma app up and running on Heroku.
After checking out the following links from the ActiveAdmin github:
Re: Rails 4 problems - Issue #1963
Rails 4 Hacks, Fixes - Pull Request #2120
I added the following to my gemfile:
gem 'devise', github: 'plataformatec/devise', branch: 'rails4'
gem 'responders', github: 'plataformatec/responders'
gem 'inherited_resources', github: 'josevalim/inherited_resources'
gem 'ransack', github: 'ernie/ransack'
gem 'activeadmin', github: 'akashkamboj/active_admin', branch: 'rails4'
gem 'formtastic', github: 'justinfrench/formtastic', branch: 'rails4beta'
replace:
gem 'jquery-rails', '3.0.0'
with:
gem 'jquery-rails', '2.3.0'
and bundle install and run the rails generate active_admin:install to install.
Fire up the server, go to root_url/admin and you should see the admin login.
January 11, 2016 Updated answer
ActiveAdmin has now Rails 4 full support :
1.0.0 Version, full support of Rails 4) :
gem 'activeadmin', github: 'activeadmin'
0.6 Stable version (may not properly support Rails 4) :
gem 'activeadmin', github: 'activeadmin', branch: '0-6-stable'
I have switched to Ubuntu, and that resolved the issue I was having. For some reason, Windows chokes when trying to get a gem that is not on the Ruby source.
Thanks for the help, Marc and Oto Brglez. A quick update for the rails 4 implementation. You do not need to use branch '0-6-stable' (that is the current branch as of today), you can instead just use the master branch as noted int he documentation on gregbell's github. https://github.com/gregbell/active_admin
Just edit your Gemfile.
This all what you need to your ActiveAdmin 1.0.0 works properly with Rails 4.1
Add following lines:
gem 'activeadmin', github: 'gregbell/active_admin' # ActiveAdmin backend framework for Rails administration interface
gem 'polyamorous', github: 'activerecord-hackery/polyamorous' # Require for ActiveAdmin to work with Rails 4.1
gem 'ransack', github: 'activerecord-hackery/ransack' # Require for ActiveAdmin to work with Rails 4.1
gem 'formtastic', github: 'justinfrench/formtastic' # Require for ActiveAdmin to work with Rails 4.1
gem 'devise' # Authentication
When trying to run gem install rake bundler I get the following error
rvmsudo gem install rake bundler
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
What might be causing this problem and how do I fix it?
OS: Ubuntu 10.10 32 bit
Sounds like your missing the zlib package.
try:
rvm pkg install zlib
then uninstall and reinstall your gem version with rvm
I'm working locally on a NodeJS Heroku app, and I'd like to use foreman to run my app. It apparently didn't install with the Heroku toolbelt (has anyone else had this problem?).
Is there a way to re-install the Heroku toolbelt to get foreman? Or could I get foreman from git? I saw the instructions here but after getting the repo and executing:
git submodule init
git submodule update
It still says that the "foreman" command is not found. What can I do to get foreman to work?
Thanks
Edit: I'm using Ubuntu
Your best bet is to probably install it with Rubygems. You don't mention which OS your on, but we'll assume your not on something mental like Windows (;))
gem -v
if you've got a version back, skip the next bit. You should only need to install RubyGems on Ubuntu (OS X has it in most recent versions)
Ubuntu only
sudo apt-get install rubygems
then
gem install foreman
The project you linked to, http://theforeman.org/projects/foreman, is not Heroku's foreman.
Heroku's foreman is a Ruby gem, and must be installed as a Ruby gem:
$ [sudo] gem install foreman
Whether you need to use sudo depends on your environment, how you installed ruby and rubygems, etc.
I just wanted to amend #Neil's answer. You need to install ruby, not rubygems.
sudo apt-get install ruby
When Ruby is installed you can then install foreman.
gem install foreman --no-rdoc --no-ri
(You don't need --no-rdoc --no-ri but I like to install gems without the documentation on production boxes)
Also take a look at rvm if you're a Ruby person. You might not want to use Ubuntu/Debian's version of Ruby.
The console output pretty much speaks for itself:
$ java -jar jruby-complete-1.6.4.jar -S gem install nokogiri --no-rdoc --no-ri
Fetching: nokogiri-1.5.0-java.gem (100%)
Successfully installed nokogiri-1.5.0-java
1 gem installed
11:17:04|dkowis#racktop jruby
$ java -jar jruby-complete-1.6.4.jar -S gem install cucumber --no-rdoc --no-ri
ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::Syck::DefaultKey
11:18:24|dkowis#racktop jruby
$ java -jar jruby-complete-1.6.4.jar -S gem install cuke4duke --version=0.4.4 --no-rdoc --no-ri
ERROR: While executing gem ... (ArgumentError)
undefined class/module YAML::Syck::DefaultKey
There's a couple gems I can install, but the ones I need, I cannot. Is it a problem with the gem itself? Is it a problem with rubygems? I'm not able to puzzle this one out.
This apparently is a known issue with Rubygems reported here on the JRuby Forum.
There is a pull request to fix this Rubygems error, but you could try build the gems you want locally and correct the dependency statements in the gemspec file yourself. I had ran into the same problem with the i18n-js gem.
Hope this helps.