Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails_xss plugin not found on install #679

Closed
lighthouse-import opened this issue May 16, 2011 · 6 comments
Closed

rails_xss plugin not found on install #679

lighthouse-import opened this issue May 16, 2011 · 6 comments

Comments

@lighthouse-import
Copy link

Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/4686
Created by Luiz Aguiar - 2011-02-19 09:28:19 UTC

$ script/plugin install --verbose http://github.com/rails/rails_xss.git
Plugin not found: ["http://github.com/rails/rails_xss.git"]

Mac
Rails 2.3.8
git version 1.7.0
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin10]

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by Anil Wadghule - 2010-05-25 07:28:33 UTC

This is an issue with rails 2.3.5 too. Try without --verbose, it should work.

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by Luiz Aguiar - 2010-05-25 13:13:11 UTC

Without --verbose, the install stay "running" for minutes, and don't install the plugin.
I tried to install others plugins and just work.

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by Santiago Pastorino - 2010-05-25 14:53:12 UTC

script/plugin install git://github.com/rails/rails_xss.git should work.
--verbose is failing yes, seems like a bug.

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by Jeff Kreeftmeijer - 2010-05-26 08:35:53 UTC

Same problem on master:

$ script/rails plugin install git://github.com/rails/rails_xss.git --verbose
Plugin not found: []

It doesn't seem to have to do anything with rails_xss, though. I get exactly the same when I try to install Paperclip as a plugin, so --verbose is the problem here.

Can somebody change the ticket name? "Plugin install with fails with --verbose option" seems like a better fit. :)

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by Łukasz Strzałkowski - 2010-07-09 19:07:36 UTC

The problem is with order of params, not with verbose options it self.

If you invoke:


strzalek@imac-strzalek ~/projects/ruby/rails_sandbox ➔ script/rails plugin --verbose install git://github.com/rails/rails_xss.git
Plugins will be installed using http
git init
Initialized empty Git repository in /Users/strzalek/projects/ruby/rails_sandbox/vendor/plugins/rails_xss/.git/
git pull --depth 1 git://github.com/rails/rails_xss.git
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 33 (delta 5), reused 3 (delta 0)
Unpacking objects: 100% (33/33), done.
From git://github.com/rails/rails_xss
 * branch            HEAD       -> FETCH_HEAD
removing: .git .gitignore

It will work without problems. But when I execute command with --verbose at the end, then I'm also encountering errors:

strzalek@imac-strzalek ~/projects/ruby/rails_sandbox ➔ script/rails plugin install git://github.com/rails/rails_xss.git --verbose
Plugin not found: []

Actually it's even not an error.

@lighthouse-import
Copy link
Author

Imported from Lighthouse.
Comment by chaitanyav - 2010-07-10 05:19:12 UTC

@lukasz as you said , I tried this

neo@myhost ~/p/awesome> 
rails plugin --verbose install  git://github.com/rails/rails_xss.git
"install"
Plugins will be installed using http
git init
Initialized empty Git repository in /home/neo/projects/awesome/vendor/plugins/rails_xss/.git/
git pull --depth 1 git://github.com/rails/rails_xss.git
remote: Counting objects: 33, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 33 (delta 5), reused 3 (delta 0)
Unpacking objects: 100% (33/33), done.
From git://github.com/rails/rails_xss
 * branch            HEAD       -> FETCH_HEAD
removing: .git .gitignore

Now, I will remove the plugin

neo@myhost ~/p/awesome> 
rails plugin --verbose remove  git://github.com/rails/rails_xss.git
"remove"
Removing 'vendor/plugins/rails_xss'

I hacked the rails gem to find out what is actually happening in the code. I changed this file railties-3.0.0.beta4/lib/rails/commands/plugin.rb

BTW, I added "p e.message" after line 422.

I will add the --verbose at the end

rails plugin  install git://github.com/rails/rails_xss.git --verbose
"invalid option: --verbose"
Plugin not found: []

one more try

neo@myhost ~/p/awesome> 
rails plugin  install git://github.com/rails/rails_xss.git --quiet

According to the code --verbose at the end is a invalid option

The command can be used in the following ways

neo@myhost ~/p/awesome> rails plugin
Unknown command: 
Usage: plugin [OPTIONS] command
Rails plugin manager.
GENERAL OPTIONS
  -r, --root=DIR                   Set an explicit rails app directory. Default: /home/neo/projects/awesome
  -s, --source=URL1,URL2           Use the specified plugin repositories instead of the defaults.
  -v, --verbose                    Turn on verbose output.
  -h, --help                       Show this help message.
COMMANDS
  install    Install plugin(s) from known repositories or URLs.
  remove     Uninstall plugins.
EXAMPLES
  Install a plugin:
  rails plugin install continuous_builder
  Install a plugin from a subversion URL:
  rails plugin install http://dev.rubyonrails.com/svn/rails/plugins/continuous_builder
  Install a plugin from a git URL:
  rails plugin install git://github.com/SomeGuy/my_awesome_plugin.git
  Install a plugin and add a svn:externals entry to vendor/plugins
  rails plugin install -x continuous_builder

OR

neo@myhost ~/p/awesome> 
rails plugin  install git://github.com/rails/rails_xss.git --help
Usage: rails install PLUGIN [PLUGIN [PLUGIN] ...]
Install one or more plugins.
Options:
  -x, --externals                  Use svn:externals to grab the plugin.Enables plugin updates and plugin versioning.
  -o, --checkout                   Use svn checkout to grab the plugin.Enables updating but does not add a svn:externals entry.
  -e, --export                     Use svn export to grab the plugin.Exports the plugin, allowing you to check it into your local repository. Does not enable updates, or add an svn:externals entry.
  -q, --quiet                      Suppresses the output from installation.Ignored if -v is passed (rails plugin -v install ...)
  -r, --revision REVISION          Checks out the given revision from subversion or git.Ignored if subversion/git is not used.
  -f, --force                      Reinstalls a plugin if it's already installed.

You can specify plugin names as given in 'plugin list' output or absolute URLs to 
a plugin repository.

please verify this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants