Pregunta

Estoy tratando de instalar menos en un proyecto Ruby on Rails. Soy capaz de ejecutar con éxito la gema, pero cuando intento instalar el plugin para menos, me da un error. Esto es lo que muestra en el terminal:

MacBook:benji jesse$ sudo gem install less
Successfully installed less-1.2.21
1 gem installed
Installing ri documentation for less-1.2.21...
Installing RDoc documentation for less-1.2.21...
MacBook:benji jesse$ sudo script/plugin install git://github.com/cloudhead/more.git
sudo: script/plugin: command not found

Soy un desarrollador de .NET tratando de aprender Ruby on Rails (en un Mac), por lo que soy nuevo en todo esto.

Mi pregunta es:

  • ¿Es el script / comando plugin de un comando estándar?
    • ¿Qué hacer?
    • ¿Dónde puedo encontrar más información sobre este comando?
  • comando ¿Por qué dice no se puede encontrar?
¿Fue útil?

Solución

Is the script/plugin command a standard command?

It is in rails 2, it has changed in rails 3:

rails plugin
# or
script/rails plugin

What does it do?

installs the given plugin into the RAILS_ROOT/vendor/plugin, but you should look if there is a gem version of the plugin, than you can add a gem dependency to this gem.

Where can I learn more about this command?

run the command without any parameters

Why does it say command can't be found?

try ls script/ and see if the file exists.

Otros consejos

You have to be in the application directory. Say you created your rails app in the folder development/rails_app. You must execute the script/plugin command from there (and you don't need super user permissions for that):

cd development/rails_app
script/plugin install git://github.com/cloudhead/more.git

The plugin installation will apply only to the current rails application (in this case, rails_app). So if you create another application, you must run the script/plugin command again.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top