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.
Related
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
In rails 4.1.4, I am trying to install script/plugin install git://github.com/p8/table_builder.git plugin but I am getting an error like bash: script/plugin: No such file or directory.
Same command I have tried with bin/plugin then also I got the same error like bash: bin/plugin: No such file or directory
How can I install this plugin with the same(above) command? Please help me to solve this issue.
Firstly: p8/table_builder plugin is no longer maintained. Use this fork instead https://github.com/watu/table_builder
Secondly: You should use Gemfile to install plugins (GEMS in Ruby) and menage dependencies.
Open your Gemfile (comes with rails new by default) and add
gem "watu_table_builder", :require => "table_builder"
Save file and run bundle install (or just bundle, it's shortcut).
Bah! It's done. Dependencies are solved and gem (plugin) is installed.
Further reading: http://bundler.io/v1.3/gemfile.html
OS: Linux Debian Wheezy
Rails version: 3.2.0
I want to configure RSpec to work with Rails.
I'm using this instruction: https://github.com/rspec/rspec-rails ('Installation' section).
When I try:
rails generate rspec:install
after successfully performing all the things described in the manual before,
I get:
Usage: rails new APP_PATH [options]
etc.
How to resolve this?
IMHO Relevant part of my Gemfile:
gem 'rails', '3.2.0'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '~> 2.0'
end
(I'm new to Rails and using M. Hartl manual to learn.)
(What I have tried already:
changing Rails version (4.0.0, then to 3.2.0);
changing rspec version (initially 2.8.0, then to ~> 2.0);
a few times 'bundle update', 'bundle install' and 'bundle update rspec-rails';
installing 'rspec' and 'rspec-rails' using 'gem install';
This is because when you install gem install rails after June 25, 2013 - it will install the rails 4. When you following the course, Hartl asks you to copy his Gemfile located in his GitHub repo which actually refers to Rails '3.2.14'.
To solve this problem, create a gemset using RVM.
rvm gemset create sample_app
rvm gemset use sample_app
Then create a Gemfile inside an empty folder.
mkdir sample
touch Gemfile
Copy the content form the Hartl's (Gemfile)[https://raw.github.com/railstutorial/sample_app_2nd_ed/master/Gemfile] to the Gemfile you just now created and run,
bundle install
Once all gems are installed, simply go outside the folder and delete it.
cd .. && rm -rf sample
Now create a new Rails project and skip the auto bundle install.
rails new sample --skip-unit-test --skip-bundle
Once Rails generated the files, go inside the folder and replace the Gemfile contents again with Hart's Gemfile.
Now run bundle install
Finally you can create the RVM file that will automatically switch to the project gemset.
rvm --create --ruby-version use ruby-2.0.0#sample-app
ruby-2.0.0 refers to my system's active Ruby version. You'll need to replace this accordingly.
This should work fine. Let me know if you have any further help.
Cheers!
have ruby 1.8.7, gem 1.3.7 and rails 3.0.6. I wanted to add xmpp4r to my project, but i got error just i require this gem. I'm install this gem using gem install xmpp4r. Installation seems successful.But, why error then appear?
P.S. if in console enter the irb and execute require "xmpp4r" result will be true.
P.S.S. OS is Fedora
Rails 3 uses Bundler to manage gem dependencies. When you start a rails 3 application, bundler sets up the require path to only include those gems you have specified in your Gemfile file, and their dependencies; it's not enough to just have the gem installed on your system.
In order to get this working, simply add this line to your Gemfile:
gem 'xmpp4r'
I'm trying to get Heroku working with European buckets on amazon s3 webserivces using the aws-s3 gem. It seems I need to install a forked version of the gem to get around the issue. However, with heroku I can only use the .gems file to install gems.
Can I use this .gems file to install forked-gems somehow?
Unpack the gem in your local repository, then add it to your git repository. This will copy the gem to your vendor/gems directory. Also remember to remove the gem from your .gems list to prevent Heroku from using the unwanted version.
#Unpacks all gems
rake gems:unpack
#Unpack a specific gem
rake gems:unpack GEM=xxxxx
Heroku already supports Bundler even for not-Rails 3 application.
http://blog.heroku.com/archives/2010/2/17/gem_bundler_on_heroku/
You can switch to Bundler and use its syntax to have Bundler downloading the Gem from the fork.