Hi I am using rails 3 and ruby 1.9.3 and i am trying to install dynamic-spree-sitemaps with following code
script/extension install git://github.com/polomasta/dynamic-spree-sitemaps.git
mv vendor/extensions/dynamic-spree-sitemaps vendor/extensions/sitemaps
but it gives us
bash: script/extension: No such file or directory
please some one help me
I have not install this gem but script/extension install is old Rails 2.x command syntax. Instead do something like this.
In you Gemfile add:
gem 'dynamic-spree-sitemaps', :git => 'git://github.com/polomasta/dynamic-spree-sitemaps.git'
Or with https version:
gem 'dynamic-spree-sitemaps', :git => 'https://github.com/polomasta/dynamic-spree-sitemaps'
And run bundle install
Other way of installing directly from github source is by using a gem called specific_install
gem install specific_install
gem specific_install -l <url to a github gem>
In this case:
gem specific_install https://github.com/polomasta/dynamic-spree-sitemaps.git
Related
bundler (2.0.1, default: 1.17.2)
How could I change the default to 2.0.1
Following https://bundler.io/guides/bundler_2_upgrade.html#upgrading-applications-from-bundler-1-to-bundler-2, here's what worked for me:
gem install --default bundler
gem update --system
bundle update --bundler
What helped me is to delete the current default manually from the folder
lib\ruby\gems\2.6.0\specifications\default\
and then install fresh bundler as usually
gem install bundler
or as default
gem install --default bundler
I had this same concern when trying to setup Bundler gem 2.2.11 as the default gem on my machine.
Here's how I achieved it:
First, I listed and uninstalled all other versions of the Bundler gem because I did not need them:
gem list bundler
gem uninstall bundler
If you encounter an error like this
Gem bundler-2.1.4 cannot be uninstalled because it is a default gem
Simply run the command below to get your ruby installation directory:
gem environment | grep "INSTALLATION DIRECTORY"
This should display an output like this. In my case my ruby version was 2.7.2:
- INSTALLATION DIRECTORY: /home/mycomputer/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0
Next, navigate to the specifications/default directory of the INSTALLATION PATH:
cd /home/mycomputer/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/specifications/default
Remove/delete the bundler.gemspec file that you have there. In my case it was bundler-2.1.4.gemspec, so I ran the command:
rm bundler-2.1.4.gemspec
Next, I installed the Bundler gem 2.2.11 and made it the default gem:
gem install --default bundler -v 2.2.11
Next, I listed my Bundler versions:
gem list bundler
Finally, I updated my gems to use the newly installed Bundler:
gem update --system
That's all.
I hope this helps
You need to remove .spec file to remove the gem.
Steps:
gem env – try to search in provided list under GEM PATHS, in specifications/default
remove there bundler-VERSION.gemspec
install bundler, if you don't have specific: gem install bundler:VERSION --default
gem install --default bundler:<version>
You need to know where the default specs are, so use gem environment to find out.
the steps I used were:
gem environment
# note INSTALLATION DIRECTORY
cd <installation_dir>
cd specifications/default
rm bundler-2.1.4.gemspec
gem install --default bundler -v 2.2.11
Remove all default bundler versions.
Commands:
$ gem environment
$ cd INSTALLATION DIRECTORY
$ cd specifications
$ cd default
$ rm bundler version
$ gem install bundler
I have installed rails and am running Git Bash and am on Windows 7 64 bit, i have installed gemfile and updated and this is my first use of ruby! I am following the instrustions from devise's github: https://github.com/plataformatec/devise . I am probably being very stupid but when i run gem 'devise' and this error occurs:
ERROR: while executing gem... <Gem::commandlinerror> unknown command /devise
Any help would be greatly appreciated
i think you are not installing gem properly.
gem install command is gem install devise
or perhaps you should add the gem to your Gemfile like this
gem "devise"
and then run this command in your terminal
bundle install
If you are running gem 'devise' then it won't work because its not a valid command.
You should give
gem install devise
or
Include gem 'devise' in Gemfile and run bundle install
I just installed RVM, Ruby, Rails etc. on my virtual ubuntu 12.04 32bit running in a virtualbox. Now I encounter the problem that for my first rails project bundle install or bundle update takes very long time. Even when I create a new project with rails (which includes bundle install).
I use only the standard gems:
source 'https://rubygems.org'
gem 'rails', '3.2.12'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development do
gem 'sqlite3', '1.3.5'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.5'
gem 'coffee-rails', '3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.2'
I tried bundle install without any gems but gem 'rails', '3.2.12'. After that I typed again bundle install with all gems in my gemfile. It took me 10 minutes to check for dependencies. The output of --verbose is a mix of HTTP success and HTTP redirection.
Rails version: Rails 3.2.12
Ruby version: ruby 1.9.3p392 (2013-02-22 revision 39386)
Rvm: rvm 1.18.18
bundle version: Bundler version 1.3.2
I already searched fot a solution, but nothing helped.
I want to warn: There is a security purpose for using https over http. Try at first the other answers mentioned in this thread.
Changing https to http in my Gemfile did the magic. Before I have to create the project with rails new APP --skip-bundle
Bundler just got an update of parallel processing of gems.
gem install bundler --pre
will solve the problem in the best possible way for now.
Source
You can also use multiple jobs, it may improve a little bit
bundle install --jobs 8
Here is a tutorial about it
Bundler v1.12.x was released in 2016 and caused some users to experience slow bundle install issues.
In this instance staying with v1.11.2 is the best option (it's fast) until a fix is released.
It's worth heading over to Rubygems.org to try different versions of the bundler gem.
Check existing bundler versions, uninstall existing version, install version 1.11.2 example:
gem list | grep bundler
gem uninstall bundler -v existing-version-number
gem install bundler -v 1.11.2
A developer friendly method is to override the gem server with a faster alternative.
In our case, we can configure http as a mirror to address slow https connections:
bundle config mirror.https://rubygems.org http://rubygems.org
This allows you to keep original Gemfile configuration while still using faster http connections to fetch gems.
If you wanted to switch back to https:
bundle config --delete mirror.https://rubygems.org
bundle config has a default --global option. You can specify --local to limit configurations to local application folder.
Configuration is saved into global ~/.bundle/config and local .bundle/config.
If you're still seeing this issue with Bundler 1.12.5, you may want to try updating the OpenSSL used by your Ruby.
For me this went like so:
pmorse$ bundle --version
Bundler version 1.12.5
pmorse$ ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
OpenSSL 1.0.1j 15 Oct 2014
pmorse$ openssl version
OpenSSL 0.9.8zg 14 July 2015
pmorse$ brew info openssl
openssl: stable 1.0.2h (bottled) [keg-only]
[... more brew output ...]
pmorse$ rvm reinstall ruby-2.2.2 --with-openssl-dir=`brew --prefix openssl`
[... lots of rvm output ...]
pmorse$ ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION'
OpenSSL 1.0.2h 3 May 2016
This should make bundle quicker again without requiring you to go from https to http.
I know this may be basic answer but try to install developer tools from the main Ruby site. I have had a similar problem and it did work. Sometimes simple solutions are the best!
Good luck!
After upgrading to Rails 3.0 Library rmagick longer be detected. Here is my setup:
Ubuntu server 10.4
gem 1.7.2
ruby 1.9.1
rails 3.0.7
rmagick-2.13.1
In irb can include library:
irb(main):002:0> require 'RMagick'
=> true
In rails 2 rmagick is available.
add
gem 'RMagick'
or
gem "rmagick", "~> 2.13.1"
to your Gemfile and then run
bundle
install
apt-get install libmagick9-dev
first
For those using Heroku:
gem "rmagick", "~>2.13.2", :require => 'RMagick'
Also, include the following wherever you're using it:
require 'RMagick'
For anyone reading this now, I was having issues installing libmagick9-dev(it appears to have been replaced).
I ran the following and it installed successfully:
sudo apt-get install libmagickcore-dev
sudo apt-get install graphicsmagick-libmagick-dev-compat
sudo apt-get install libmagickwand-dev
sudo apt-get install imagemagick
gem install rmagick
Cheers
When running bundle for an application like Redmine, gem might be optional, so you must include it like:
bundle install --with rmagick
Considering that it exists in your Gemfile, it should look something
like:
group :rmagick do
gem "rmagick", "~> 2.16.0"
end
I did: heroku plugins:install git://github.com/galetahub/rails-ckeditor.git
And got
Could not initialize rails-ckeditor: uninitialized constant ActiveSupport
Are you attempting to install a Rails plugin? If so, use the following:
Rails 2.x:
script/plugin install git://github.com/galetahub/rails-ckeditor.git
Rails 3.x:
rails plugin install git://github.com/galetahub/rails-ckeditor.git
my gemfile:
source :rubygems
gem 'rails', '2.3.8'
gem 'authlogic', '2.1.6'
gem 'addresslogic', '1.2.1'
gem 'searchlogic', '2.4.19'
gem 'subdomain-fu', '0.5.4'
gem 'ckeditor', '3.4.3'
So what happened when you ran script/plugin install git://github.com/galetahub/rails-ckeditor.git?
The idea of a plugin is that it will end up in the vendor directory in your Rails project, not as a stand-alone install on the server (those are gems).
DerNalia,
If I'm understanding you correctly I think you are misinterpreting what the heroku plugin install function is for. It's not for installing Rails plugins, it's for install plugins for the heroku command, like the heroku_colorize_console plugin. To install a plugin for your Rails application for Rails 2 you would use
script/plugin install git://github.com/galetahub/rails-ckeditor.git
This would install plugin into your vendor/plugins directory in your application and be initialized based on it's init.rb file (which is executed automated when the site loads). Your heroku app would have it accessible once you commit the changes and deploy back up to heroku.
See http://devcenter.heroku.com/articles/using-cli-plugins for more details about the Heroku command and the plugins function.