I am fairly sure that this is a PATH issue, but I am at the end of my rope trying to solve it. Hopefully one of the wizards will be able to help. Here's some relevant information:
System: Ubuntu 16.04 LTS running on Cloud
Environment Manager: Chef 12.21.3
rbenv version 0.4.0 installed via Chef ruby_rbenv cookbook
bundler version: 1.15.1 installed via ruby_rbenv LWRP systemwide
libpq-dev: INSTALLED
ruby-build: INSTALLED
PostGreSQL-9.5: INSTALLED
Alterations to .bashrc? NO
Alterations to PATH in capistrano? NO
Thus far I have been able to do everything through set directives in capistrano
And now the fun stuff
Gemfile
source 'https://rubygems.org'
ruby '2.3.4'
# admin UI gem
gem "activeadmin", :github => "activeadmin"
# This was the default encoder used by ActiveSupport prior to Rails 4.1
gem 'activesupport-json_encoder'
# Error handling gem, leave on v4, migration effort required to go to v5
gem 'airbrake', '4.3.6'
# AngularJS-style CSRF Protection for Rails
gem 'angular_rails_csrf'
# Required by 'has_secure_password'
gem 'bcrypt-ruby'
# Remote site scripting
gem 'capybara'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails'
# user authentication
gem 'devise'
# http library for api requests
gem 'faraday_middleware'
# forecast.io weather API
gem 'forecast_io'
# Find lat/long of businesses, currently just used for weather lookups.
gem 'geocoder'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder'
# email handling
gem 'mail'
# Facilitates communciation with Redis
gem 'message_bus'
# JS based charting library
gem 'morrisjs-rails'
# site performance monitoring
gem 'newrelic_rpm'
# html/xml parser
gem 'nokogiri'
# A Ruby wrapper for the OAuth 2.0 specification.
gem 'oauth2'
# Use Postgresql as the database for Active Record
gem 'pg'
# Application server
gem 'puma'
# PhantomJS in the gemfile for access through bundle exec
gem 'phantomjs', :require => 'phantomjs/poltergeist'
# JS based scripting gem for Capybara
gem 'poltergeist'
# force ssl connection
gem 'rack-ssl-enforcer'
# JS vector graphics
gem 'raphael-rails'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.2.6'
# Use SCSS for stylesheets
gem 'sass-rails'
# Background job processing
gem 'sidekiq'
# process monthly payments
gem 'stripe'
# allow switching between users
gem 'switch_user'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier'
gem 'redis-namespace'
gem 'yelp'
gem 'net-ssh'
gem 'fast-stemmer'
# bundle exec rake doc:rails generates the API under doc/api.
group :doc do
gem 'sdoc', '~> 0.4.0'
end
group :development do
# These two gems let us send exceptions to slack, if configured.
gem 'exception_notification'
gem 'slack-notifier'
gem 'capistrano'
gem 'capistrano-rbenv'
gem 'capistrano-bundler'
gem 'capistrano-rails'
gem 'capistrano3-puma'
gem 'capistrano-sidekiq'
gem 'capistrano-faster-assets'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
# suppress asset pipeline logs
gem 'quiet_assets'
# Generates ERDs with 'rake erd'
gem 'rails-erd'
# load env variables from .env file
gem 'dotenv-rails'
# debugging gems
gem 'better_errors'
gem 'binding_of_caller'#, platforms: [:mri_19, :mri_20, :rbx]
gem 'pry-byebug'
gem 'pry-doc'
gem 'pry-rails'
gem 'pry-remote'
end
group :test do
gem 'database_cleaner'
gem 'email_spec'
gem 'factory_girl_rails'
gem 'faker'
gem 'rspec-rails'
gem 'timecop'
end
group :production do
end
Capfile
# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
# Make sure that we have the library for rails included
require "capistrano/rails"
# Since we use Sidekiq, we need to gracefully stop processing jobs
# during a new deployment, and start accepting jobs when the deployment
# is complete as worker logic might change.
require "capistrano/sidekiq"
# Puma Requirements.
require 'capistrano/puma'
# Dynamic NGINX configuration
require 'capistrano/puma/nginx'
# We use rbenv
require 'capistrano/rbenv'
# We use Bundler
require 'capistrano/bundler'
# Configure Capistrano to use GIT for project management
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }
Relevant Deploy Information
set :rbenv_type, :system
set :bundle_flags, "--deployment --quiet --binstubs --shebang ruby-local-exec"
set :bundle_path, -> { shared_path.join('bundle') }
set :linked_files, %w{config/database.yml}
# Even in staging, we're testing against the production settings... that's the point.
set :rails_env, :production
# clean up old assets after each deploy,
# set this to the number of versions to keep
set :keep_assets, 2
# Rails handles this through its framework migrations.
set :migration_role, :app
# Defaults to the primary :db server
# However, by setting it up like this, the role handling the migration is the one that runs
# the rake db:migrate command.
set :migration_servers, -> { primary(fetch(:migration_role)) }
set :conditionally_migrate, true
set :assets_roles, [:web]
# Defaults to 'assets'
# This should match config.assets.prefix in your rails config/application.rb
# ... but we don't have that configuration option set. A lot of reading I did pointed
# to the inclusion of this command, but I am going to leave it out on the premise that
# we do not have the config.assets.prefix set for a good reason. If this changes,
# then uncomment the following line:
# set :assets_prefix, 'prepackaged-assets'
# If you need to touch public/images, public/javascripts, and public/stylesheets on each deploy
#set :normalize_asset_timestamps, %w{public/images public/javascripts public/stylesheets}
The Problem
01 /usr/local/rbenv/bin/rbenv exec bundle install --path <OMITTED>/shared/bundle --without development test --deployment --quiet --binstubs --shebang ruby-local-exec
** DEPLOY FAILED
** Refer to log/capistrano.log for details. Here are the last (more than 20) lines:
/usr/local/rbenv/bin/rbenv exec bundle install --path <OMITTED>/shared/bundle --without development test --deployment --quiet --binstubs --shebang ruby-local-exec
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
<OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
/usr/local/rbenv/versions/2.3.4/bin/ruby -r ./siteconf20170711-55875-b7vll7.rb
extconf.rb --with-pg_config=/usr/bin/pg_config
Using config values from /usr/bin/pg_config
sh: 1: /usr/bin/pg_config: not found
sh: 1: /usr/bin/pg_config: not found
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
<SNIP>
extconf failed, exit code 1
Gem files will remain installed in
<OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4 for inspection.
Results logged to
<OMITTED>/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/gem_make.out
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
In Gemfile:
pg
MKMF.log
Relevant:
find_executable: checking for pg_config... -------------------- yes
--------------------
find_header: checking for libpq-fe.h... -------------------- yes
< The rest of this is too large to put here. It is available on request>
gem_make.out
cat ./shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/gem_make.out
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
/usr/local/rbenv/versions/2.3.4/bin/ruby -r ./siteconf20170707-35742-1cvk2th.rb extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... yes
checking for PQisthreadsafe()... yes
checking for PQprepare()... yes
checking for PQexecParams()... yes
checking for PQescapeString()... yes
checking for PQescapeStringConn()... yes
checking for PQescapeLiteral()... yes
checking for PQescapeIdentifier()... yes
checking for PQgetCancel()... yes
checking for lo_create()... yes
checking for pg_encoding_to_char()... yes
checking for pg_char_to_encoding()... yes
checking for PQsetClientEncoding()... yes
checking for PQlibVersion()... yes
checking for PQping()... yes
checking for PQsetSingleRowMode()... yes
checking for PQconninfo()... yes
checking for rb_encdb_alias()... yes
checking for rb_enc_alias()... yes
checking for rb_thread_call_without_gvl()... yes
checking for rb_thread_call_with_gvl()... yes
checking for rb_thread_fd_select()... yes
checking for rb_w32_wrap_io_handle()... no
checking for rb_str_modify_expand()... yes
checking for rb_hash_dup()... yes
checking for PGRES_COPY_BOTH in libpq-fe.h... yes
checking for PGRES_SINGLE_TUPLE in libpq-fe.h... yes
checking for PG_DIAG_TABLE_NAME in libpq-fe.h... yes
checking for struct pgNotify.extra in libpq-fe.h... yes
checking for unistd.h... yes
checking for inttypes.h... yes
checking for ruby/st.h... yes
checking for C99 variable length arrays... yes
creating extconf.h
creating Makefile
To see why this extension failed to compile, please check the mkmf.log which can be found here:
<OMITTED>/shared/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0-static/pg-0.18.4/mkmf.log
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR=" clean
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR="
compiling pg_type_map_by_mri_type.c
compiling pg_coder.c
compiling pg_type_map_by_column.c
compiling pg_result.c
compiling pg_type_map_in_ruby.c
compiling pg_errors.c
compiling pg.c
compiling util.c
compiling pg_type_map_by_class.c
compiling pg_copy_coder.c
compiling pg_type_map.c
compiling pg_text_encoder.c
compiling pg_binary_encoder.c
compiling pg_connection.c
pg_connection.c: In function ‘wait_socket_readable’:
pg_connection.c:2394:3: warning: implicit declaration of function ‘gettimeofday’ [-Wimplicit-function-declaration]
gettimeofday(&currtime, NULL);
^
compiling pg_type_map_all_strings.c
compiling pg_type_map_by_oid.c
compiling gvl_wrappers.c
compiling pg_text_decoder.c
compiling pg_binary_decoder.c
linking shared-object pg_ext.so
current directory: <OMITTED>/shared/bundle/ruby/2.3.0/gems/pg-0.18.4/ext
make "DESTDIR=" install
/usr/bin/install -c -m 0755 pg_ext.so ./.gem.20170707-35742-11dgneo
The Weirdness
dev#app-1:<OMITTED>/releases/20170711040154$ bundle install
The git source `git://github.com/activeadmin/activeadmin.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using rake 11.1.2
Using i18n 0.7.0
Using json 1.8.3
Using minitest 5.8.4
Using thread_safe 0.3.5
Using sass 3.4.22
Using thor 0.19.1
Using coffee-script-source 1.10.0
Using execjs 2.6.0
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.0.0
Using rack 1.6.4
Using formtastic_i18n 0.6.0
Using mime-types 2.99.1
Using arel 6.0.3
Using concurrent-ruby 1.0.1
Using bundler 1.15.1
Using tilt 2.0.2
Using multi_json 1.12.1
Using bcrypt 3.1.11
Using addressable 2.4.0
Using orm_adapter 0.5.0
Using multipart-post 2.0.0
Using hashie 3.4.6
Using geocoder 1.3.3
Using redis 3.2.2
Using newrelic_rpm 3.15.1.316
Using jwt 1.5.1
Using multi_xml 0.5.5
Using pg 0.18.4
Using puma 3.4.0
Using phantomjs 2.1.1.0
Using cliver 0.3.2
Using websocket-extensions 0.1.2
Using rack-ssl-enforcer 0.2.9
Using raphael-rails 2.1.2
Using connection_pool 2.2.0
Using unf_ext 0.0.7.2
Using netrc 0.11.0
Using switch_user 1.2.1
Using simple_oauth 0.3.1
Using net-ssh 3.1.1
Using fast-stemmer 1.0.2
Using rails_serve_static_assets 0.0.5
Using rails_stdout_logging 0.0.5
Using rdoc 4.2.2
Using tzinfo 1.2.2
Using bourbon 4.2.6
Using coffee-script 2.4.1
Using uglifier 3.0.0
Using nokogiri 1.6.7.2
Using rack-test 0.6.3
Using warden 1.2.6
Using mail 2.6.4
Using sprockets 3.6.0
Using airbrake 4.3.6
Using bcrypt-ruby 3.1.5
Using faraday 0.9.2
Using message_bus 1.1.1
Using redis-namespace 1.5.2
Using websocket-driver 0.6.3
Using sidekiq 4.1.1
Using unf 0.1.4
Using rails_12factor 0.0.3
Using sdoc 0.4.1
Using activesupport 4.2.6
Using loofah 2.0.3
Using xpath 2.0.0
Using faraday_middleware 0.10.0
Using forecast_io 2.0.1
Using oauth2 1.1.0
Using domain_name 0.5.20160310
Using arbre 1.0.3
Using rails-deprecated_sanitizer 1.0.3
Using globalid 0.3.6
Using activemodel 4.2.6
Using activesupport-json_encoder 1.1.0
Using jbuilder 2.4.1
Using rails-html-sanitizer 1.0.3
Using capybara 2.7.0
Using yelp 2.1.2
Using http-cookie 1.0.2
Using rails-dom-testing 1.0.7
Using activejob 4.2.6
Using activerecord 4.2.6
Using poltergeist 1.9.0
Using rest-client 1.8.0
Using actionview 4.2.6
Using polyamorous 1.3.0
Using stripe 1.42.0
Using actionpack 4.2.6
Using railties 4.2.6
Using formtastic 3.1.4
Using has_scope 0.6.0
Using kaminari 0.16.3
Using actionmailer 4.2.6
Using sprockets-rails 3.0.4
Using ransack 1.7.0
Using heroku_rails_deflate 1.0.3
Using coffee-rails 4.1.1
Using responders 2.1.2
Using jquery-rails 4.1.1
Using jquery-ui-rails 5.0.5
Using morrisjs-rails 0.5.1
Using rails 4.2.6
Using sass-rails 5.0.4
Using inherited_resources 1.6.0
Using devise 3.5.6
Using angular_rails_csrf 1.0.4
Using activeadmin 1.0.0.pre2 from git://github.com/activeadmin/activeadmin.git (at master#d84f819)
Bundle complete! 60 Gemfile dependencies, 111 gems now installed.
Gems in the groups development and test were not installed.
Bundled gems are installed into <OMITTED>/shared/bundle.
I truly am stumped on this. I have been attempting to get this machine configured for two days and have been able to get precisely nowhere.
Any help is appreciated.
Solution
This problem was related to Chef deploying rbenv and installing bundler along with executing the proper installation for ruby-build. The problem was solved by configuring a VM by hand and launching the deploy process at it.
You can try this command from server console:
sudo apt-get install libpq-dev build-essential postgresql-server-dev-9.5
And then try to do
gem install pg
Related
When I try to deploy my app to Bluemix I get the following error. My manifest.yml file is here as follows.
applications:
- path: .
memory: 512M
instances: 1
domain: mybluemix.net
name: KnowYourBrand
host: kyb
command: bundle exec rake db:setup && bundle exec rails s -p $PORT
disk_quota: 1024M
services:
- Personality Insights-n2
- Tone Analyzer-uu
- Insights for Twitter-bt
- kybSQLDB
- AlchemyAPI-tw
buildpack: https://github.com/ibmdb/db2rubybuildpack
2015-11-17T13:04:51.55-0600 [App/0] ERR LoadError: libdb2.so.1:
cannot open shared object file: No such file or directory -
/home/vcap/app/vendor/bundle/ru by/2.2.0/extensions/x86_64-linux/
2.2.0-static/ibm_db-2.6.1/ibm_db.so
My gemfile is as follows:
source 'http://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.1.8'
gem 'backbone-on-rails'
gem 'whenever', :require => false
group :production do
gem 'ibm_db'
gem 'rails_12factor'
end
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-script-source', '1.8.0'
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
gem 'bcrypt-ruby', '>= 3.1.2', :platform => :ruby
gem 'httparty'
gem 'figaro'
gem "cf-autoconfig", "~> 0.2.1"
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development do
gem 'byebug'
gem 'annotate'
gem 'better_errors'
gem 'binding_of_caller'
gem 'pry-rails'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
end
# Use debugger
# gem 'debugger', group: [:development, :test]
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin]
What could the issue be? I tried setting the ibm_db version to an older version, but that did not resolve the issue either.
Environment variable IBM_DB_HOME is not set. Set it to your
DB2/IBM_Data_Server_ Driver installation directory and retry gem
install.
What is the best way to handle this without having to install a driver on my local machine? I am just trying to deploy it to Bluemix.
I'm not entirely sure, but it appears that you need to set the IBM_DB_HOME environment variable. You can configure environment variables either using the cf set-env command, in your manifest.yml file, or in the Bluemix dashboard. I'm not familiar enough with ibm_db gem or DB2 to say what the value should be for this environment variable, but this README in the gem may be helpful (search the page for "IBM_DB_HOME").
You can track this question in ibm_db git issue repository here
The ibm_db gem auto downloads the required files while installing the gem. However after ibm_db gem is installed in Bluemix, it is not able to link the downloaded libraries.
To resolve this problem, please follow below steps.
Step-1. While pushing application with migration, pass a command to set LD_LIBRARY_PATH environment variable as below.
cf push BlogApp2 -c "export
LD_LIBRARY_PATH=/home/vcap/app/vendor/bundle/ruby/2.2.0/gems/ibm_db-3.0.0/lib/clidriver/lib:$LD_LIBRARY_PATH;
bundle exec rake db:migrate"
Note : While running above commad, please specify the Ruby version and ibm_db version that you have specified in gemfile. You can also refer the path in LoadError: libdb2.so error message that you see in server logs on Bluemix.
After application is pushed, you will see that migration has run and you will also see database connection error which is expected.
Step-2. Add below Environment Variable in your application. Login to bluemix -> select your Ruby application -> Click on Environment Variables manu -> Select User defined. -> Add below variable -> Save.
Name - LD_LIBRARY_PATH
Value - /home/vcap/app/vendor/bundle/ruby/2.2.0/gems/ibm_db-3.0.0/lib/clidriver/lib:$LD_LIBRARY_PATH [Refer step-1 for the value]
After adding LD_LIBRARY_PATH to your application in Bluemix, you can push your application from cf command as below.
cf push BlogApp2 -c "null"
Now your application will connect to SQLDB.
Thanks,
Arvind
I ran across this post when I was setting up a Docker image for a node.js server that uses ibm_db. I know this is a ruby app, but this information may help the next person down the road. Here is my Dockerfile that makes node_db available and working.
FROM node:10
# Create app directory
WORKDIR .
# need to download the ibm drivers and set IBM_DB_HOME
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
RUN mkdir /ibmdriver
RUN curl https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/linuxx64_odbc_cli.tar.gz \
| tar -xzf - -C /ibmdriver/
ENV IBM_DB_HOME /ibmdriver/clidriver
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:$IBM_DB_HOME/lib
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available ([email protected]+)
COPY package*.json ./
RUN npm install
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
ENV BCCB_DECISIONTREE_SERVICE_PORT 3000
EXPOSE 3000
CMD [ "npm", "start" ]
I am a beginner at Rails and when I typed in 'rails server' in Terminal, I received this error:
Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).
I am using OSX Yosemite 10.10.5. I've tried installing it:
gem install mysql2
It still gave me the same error. I see that mysql2-0.4.0 is installed. Please help, thank you!
There is a bug in Rails 4.2.4 and previous, with the newly released 0.4.0 version of the mysql2 gem -- one part of Rails will accidentally refuse to use the newly released 0.4.0 version of mysql2.
The issue is reported here, although without a lot of details:
https://github.com/rails/rails/issues/21544
Until a new version of Rails is released that fixes this one way or another, add this to your Gemfile, specifying that mysql2 0.4.0 won't work:
# mysql 0.4.0 does not work with Rails 4.2.4
# https://github.com/rails/rails/issues/21544
gem 'mysql2', '>= 0.3.13', '< 0.4.0'
You previously probably just have gem 'mysql2' in your Gemfile -- add the version constraints as above, so it knows 0.4.0 won't work. Add the comments so you know why you did it, and can remove it later when no longer neccesary (probably whenever Rails 4.2.5 comes out).
Edit the Gemfile in your app like above, and then run bundle update mysql2 in your app directory, so your app will be using a mysql2 gem version 0.3.x again, as current Rails version wants.
When Rails 4.2.5 or later comes out and you upgrade to it, you will probably want to go back to your Gemfile and remove the version requirement specification for mysql2, return it to saying just gem 'mysql2' again. So your app will be willing to use the newer mysql2 0.4.0 gem, once Rails is willing to do so too.
add gem 'mysql2' to your Gemfile to specify the gems you want to use in your project
run bundle install which will install all gems, specified by Gemfile
run rails s should work fine
In a Rails 4 app, I am trying to use ActiveAdmin 1.0.pre2. bundle install doesn't complain and seems to have included the gem and it works properly.
I am having this in my gem file:
gem 'activeadmin', github: 'gregbell/active_admin'
$> bundle show activeadmin
/home/aslam/.rvm/gems/ruby-2.1.0#monaeo/bundler/gems/active_admin-3fb7f03335b1
Even after running bundle install several times, I keep getting the following error:
git://github.com/gregbell/active_admin.git (at master) is not yet checked out.
Run `bundle install` first.
I am using
Bundler version 1.6.0.rc2 (upgraded from 1.5.3)
Ruby: ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]
Rails: 4.0.4
I am not sure what is going wrong here?
Try to install a prerelease version of Bundler:
gem install bundler --pre
It should solve the problem.
Use following in the Gemfile
gem 'activeadmin', :git => "git://github.com/gregbell/active_admin.git"
This way when you run bundle install, activeadmin would be sourced from its github repository.
Two things
A. You need to include like this in the gem file since 0.6.x is stable and maintained.
gem 'activeadmin', github: 'gregbell/active_admin', branch: '0-6-stable'
B. You can give a try by forking from the stable version of activeadmin
My solution:
rake rails:update:bin
bundle install
I have a Rails 4 project and use activerecord-sqlserver-adapter. The readme installation suggests:
gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter', '~> 4.0.0'
However, bundle install returns:
Resolving dependencies...
Could not find gem 'activerecord-sqlserver-adapter (~> 4.0.0) ruby' in the gems available on this machine.
rubygems.org show the latest version as 3.2.12. How can I bundle install version ~> 4.0.0 as 3.2.12 only supports ActiveRecord 3.x?
Why not just Source version 4.0.0 of activerecord-sqlserver-adapter directly from Github.
In Gemfile
Replace
gem 'activerecord-sqlserver-adapter', '~> 4.0.0'
With
gem 'activerecord-sqlserver-adapter', '~> 4.0.0', :git => "git://github.com/rails-sqlserver/activerecord-sqlserver-adapter.git"
They have not provided support for Rails 4 yet, you can try below gem to obtain same thing.
sudo gem install sic-activerecord-sqlserver-adapter
This will work with Rails 4 definitely, i have tried this. thanks.
It says that the adapter is missing.
You should install ruby-odbc and it should work.
gem 'ruby-odbc', '0.99995'
When creating a new Rails 4 app the default Gemfile has this in the gem list:
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
This despite that the last official version of uglifier being 2.4.0
Am I missing something here or why the discrepancy in versions?
The bundler version specifier '>= 1.3.0' means at least version 1.3.0 should be accepted. In other words, using the current version 2.4.0 is just fine.
In fact, that's the installed version you're going to have when starting a new application from scratch. Just check your Gemfile.lock file for the actual installed versions of gems in your bundle. You'll probably find something like this:
uglifier (2.4.0)
execjs (>= 0.3.0)
json (>= 1.8.0)
Which means you have uglifier 2.4.0.
More info: http://guides.rubygems.org/patterns/#pessimistic_version_constraint