I am using ubuntu and rvm 1.8.6, ruby 1.9.2, bundler (1.1.rc, 1.0.21), it was working ok. But recently, I cleared my gemset and run bundle install again to get freshen up because some stupid things I did on my own.
But the bundler puts all the gems under ./libv8 folder inside my project folder, it's quite weird to me. And my rvm folder is getting nothing. Is it because of the "therubyracer"? The following is my gemfile:
gem 'rails'
gem 'rspec'
gem 'rake', '>=0.9.2'
gem 'mongoid'
gem 'bson_ext'
gem 'hpricot'
gem 'jquery-rails', '>= 1.0.12'
gem 'therubyracer'
gem "bcrypt-ruby", :require => "bcrypt"
gem 'gdata'
#gem 'SystemTimer', '1.2.3'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
group :test do
# Pretty printed test output
gem 'turn', :require => false
end
Take a look at the .bundle/config file in your app's root.
Check if the BUNDLE_PATH variable is set, and in case it is, delete it.
Bundler will go back to rubygem's default behaviour, which is installing gems in $GEM_HOME.
You probably executed bundle install --path ./libv8 once and forgot about it.
Related
I just did a fresh install of mavricks, Postgres.app, RVM, Git.
I created a standard new rails app and everything worked fine.
However when I tried to grab a project from github and can not get bundle install to run.
d3 git:(master) bundle install
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Updating git://github.com/thomas-mcdonald/bootstrap-sass.git
fatal: Could not parse object '9c6c07f74ff515cf38380b014cfede14a4f0eae4'.
Git error: command `git reset --hard 9c6c07f74ff515cf38380b014cfede14a4f0eae4`
in directory
/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/bundler/gems/bootstrap-sass-9c6c07f74ff5
has failed.
If this error persists you could try removing the cache directory
'/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
I tried to remove the project and clone it again.
I tried removing the gemset and removing all the gems from the gemset.
I also tried to follow the error message and remove the cache folder.
Please help I really need to get back to working on this project.
Update:
I just tried a bundle update as well.
➜ d3 git:(master) bundle update
Updating git://github.com/thomas-mcdonald/bootstrap-sass.git
fatal: ambiguous argument '3': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Git error: command `git rev-parse 3` in directory
/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e
has failed.
If this error persists you could try removing the cache directory
'/Users/tyler/.rvm/gems/ruby-1.9.3-p448#d3/cache/bundler/git/bootstrap-sass-33efd1d8ffb6176fdb805029a30f02a6edfbae2e'
Update
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.15'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'thin'
gem 'unicorn'
gem 'newrelic_rpm'
gem 'mixpanel-ruby'
# Gems used only for assets and not required
# in production environments by default.
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
gem 'jquery-rails'
gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'
gem "font-awesome-rails"
gem 'haml_coffee_assets'
gem 'execjs'
group :development, :test do
gem 'jasmine-rails'
gem "letter_opener"
gem 'pry-rails'
gem 'rspec-rails'
gem 'capybara'
gem 'spin'
end
gem 'active_link_to'
gem 'acts_as_list'
gem "aws-sdk"
gem 'backbone-on-rails'
gem 'browser'
gem 'devise'
gem 'gon'
gem 'js-routes'
gem 'oj'
gem 'pusher'
gem 'rabl'
gem 'simple_form'
There is no branch 3 in https://github.com/thomas-mcdonald/bootstrap-sass/ anymore. That's why Git is complaining. So you need to change it from:
gem 'bootstrap-sass', :github => 'git://github.com/thomas-mcdonald/bootstrap-sass.git', :branch => '3'
to:
gem 'bootstrap-sass', :git => 'git://github.com/thomas-mcdonald/bootstrap-sass.git'
or use a shorthand syntax:
gem 'bootstrap-sass', :github => 'thomas-mcdonald/bootstrap-sass'
I need to work with a rails application on Mac OS 10.8 but I am having troubles starting the rails server.
I installed Ruby and I am using version ruby-1.9.2-p320 and I installed rvm and rails.
Following the Ruby Getting Started Guide (http://guides.rubyonrails.org/getting_started.html) what I need now is simply navigate into my application folder and run the command:
rails server
but I get this error
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
When running the command bundle install I get stuck with the following error
Could not find gem 'rest-client (>= 0) ruby' in git://github.com/archiloque/rest-client.git (at master).
Source does not contain any versions of 'rest-client (>= 0) ruby'
What am I missing?
Strange thing I just noticed is that when running
gem rails install
I am notified that rails has been correctly installed (Successfully installed rails-3.2.13), but when checking its version
rails --version
I receive again the error message
git://github.com/archiloque/rest-client.git (at master) is not checked out. Please run `bundle install`
The content of my Gemfile follows:
source 'https://rubygems.org'
gem 'rails', '3.2.5'
gem 'sqlite3'
gem 'devise', '2.1.2'
gem 'rest-client', :git => 'git://github.com/archiloque/rest-client.git'
gem 'jquery-rails'
gem 'rspec-rails', group: [:test,:development]
gem "paperclip", :git => "git://github.com/thoughtbot/paperclip.git"
gem "rb-readline"
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'twitter-bootstrap-rails'
gem 'uglifier', '>= 1.0.3'
end
group :test do
gem 'debugger'
gem 'factory_girl_rails'
gem 'capybara'
gem 'guard-rspec'
gem 'vcr'
gem 'fakeweb'
gem 'rb-fsevent', :require => false
gem 'guard-rspec'
gem 'growl'
gem 'database_cleaner'
end
group :development do
gem 'capistrano'
gem 'capistrano-ext'
gem 'rvm-capistrano'
end
The owner of rest-client moved the repository, see here (https://github.com/archiloque/rest-client).
Use this in your Gemfile gem 'rest-client', :git => 'git://github.com/rest-client/rest-client.git'
I'm trying to upload my rail app to Heroku. I'm using Ruby 1.9.3.
The app can be deployed okay on my local machine.
An error occurred while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rails app
I've tried entering this line to the Gemfile
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
But it doesn't seem to solve the problem.
Can someone please advise ? Thank you in advance for the help.
p.s.: Really sorry for the newbie question, I'm pretty new at Ruby on Rails development.
Below is my complete Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# for Heroku deployment - as described in Ap. A of ELLS book
group :development, :test do
gem 'sqlite3'
gem 'ruby-debug19', :require => 'ruby-debug'
end
group :production do
gem 'pg'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'therubyracer'
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
gem 'haml'
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
linecache19 is a gem used for debugging purposes. There is no need for it in production, so you should be excluding it from the gems used in production.
Add it to the :development, :test group you already have toward the top of your file, bundle, and re-deploy.
group :development, :test do
gem 'sqlite3'
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
end
OK, I'm trying to figure out how to get a gem install that the install script fails due to a space in the path name. I've tried everything I could, but for some reason the bundle install still picks up the long path rather than the symlinked path I have without the spaces.
Where does it pick up these paths?
I've tried updating bundle config but it still list the long path as the path to the local app rather than the new symlink path. If I update, it only does it for the local user not the local app.
I am stuck and I've crashed my machine by trying to remove the space in the volume name, I've added all the environment variables I can think of, I'm at a loss to get the bundler to install without referencing the path with a space in it.
I've tried contacting the developers for the gem, no love. I just need to get the whole app to use the symlink path rather than the /Volumes/Macintosh HD/ path. Ideas? suggestions? crazy ideas? I'm willing to give anything a shot at this point.
Update 12/16:
Gem is FFI.
Here's the Gemfile:
source 'http://rubygems.org'
require 'rubygems'
gem 'rails', '3.0.8'
gem 'jquery-rails'
gem 'haml'
gem 'devise'
gem 'omniauth-openid'
gem 'omniauth-twitter'
gem 'omniauth-facebook'
gem 'omniauth-github'
gem "settingslogic"
gem 'composite_primary_keys'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'squeel'
gem 'sqlite-ruby'
gem 'mysql2', '~> 0.2.6'
gem "bcrypt-ruby", :require => "bcrypt"
group :development, :test do
gem 'rspec-rails'
gem 'ruby-debug19', :require => 'ruby-debug'
gem 'hpricot', :require => false #html2haml
gem 'ruby_parser', :require => false # html2haml
gem 'pickle'
gem 'awesome_print', :require => 'ap'
gem 'factory_girl_rails'
end
group :development do
gem 'heroku', :require => false
gem 'sass'
end
group :test do
gem 'shoulda'
gem 'cucumber-rails'
gem 'spork', '~> 0.9.0.rc3'
gem 'guard-spork'
gem 'database_cleaner'
end
Install rvm
Create a gemset
Add a .rvmrc file to your RAILS_ROOT directory.
cd into your RAILS_ROOT directory.
Run bundle install.
I just removed the space in the volume name, I tried fixing the install script but I'd fix one area and it would error out in another.
I try to run spec tests and I get
bundle exec rake spec
Could not find selenium-webdriver-2.6.0 in any of the sources
So I bundle and I get:
bundle
Fetching source index for http://rubygems.org/
Could not find devise-1.4.6 in any of the sources
So I try to install devise 1.4.6 but I get
gem install devise -v1.4.6
ERROR: Could not find a valid gem 'devise' (= 1.4.6) in any repository
ERROR: Possible alternatives: devise
Which is really strange as my Gem file itself just has 'Devise' (no version number).
The rest of my Gem file is below.
I have also done rake test:prepare and the database and table exists in test.
cat Gemfile
source 'http://rubygems.org'
gem 'rake', '0.9.2'
gem 'rails', '3.1.0'
gem 'haml'
gem 'simple_form'
gem 'devise'
gem 'mysql2'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', " ~> 3.1.0"
gem 'coffee-rails', "~> 3.1.0"
gem 'uglifier'
end
gem 'jquery-rails'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test, :development do
# gem 'cucumber-rails', '0.5.0'
gem 'capybara'#, '1.0.0.beta1'
gem 'database_cleaner'#, '0.6.7'
gem "rspec-rails", "~> 2.6"
# gem 'forgery', '0.3.8'
gem "forgery"
gem 'factory_girl'#, '1.3.3'
gem 'factory_girl_rails'#, '1.0.1'
gem 'shoulda'#, '2.11.3'
gem 'rcov'
gem 'turn', :require => false # Pretty printed test output
end
Yes, it has been yanked, see here:
1.4.6 September 19, 2011 yanked
It is reading your Gemfile.lock so you need to run bundle update