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

WysiHat Engine script/generate generator command not working #2

Closed
dpie opened this issue Oct 30, 2009 · 4 comments
Closed

WysiHat Engine script/generate generator command not working #2

dpie opened this issue Oct 30, 2009 · 4 comments

Comments

@dpie
Copy link

dpie commented Oct 30, 2009

I tried to install WysiHat Engine on Mac OS 10.5.8. Here's a breakdown of my attempts. All of the following commands were performed inside the "/Users/dpie/Sites/my_app" directory. All password prompts have been removed.

  • Installed Paperclip 2.3.1.1 as a plugin
  • Set "config.gem 'wysihat-engine', :source => 'http://gemcutter.org'" in environment.rb
  $ sudo rake gems:install
  (in /Users/dpie/Sites/my_app)
  gem install wysihat-engine --source http://gemcutter.org
  ERROR:  Error installing wysihat-engine:
    wysihat-engine requires thoughtbot-paperclip (>= 2.3.1, runtime)
  • Set "config.gem 'paperclip', :source => 'http://gemcutter.org'" in environment.rb
  • Removed "config.gem 'wysihat-engine', :source => 'http://gemcutter.org'" from environment.rb
  • Removed Paperclip plugin and installed it as a gem instead
  $ sudo rake gems:install
  (in /Users/dpie/Sites/my_app)
  gem install paperclip --source http://gemcutter.org
  Successfully installed paperclip-2.3.1.1
  1 gem installed
  Installing ri documentation for paperclip-2.3.1.1...
  Installing RDoc documentation for paperclip-2.3.1.1...

  $ gem list --local
  *** LOCAL GEMS ***
  ...
  paperclip (2.3.1.1)

  $ sudo rake gems:unpack
  (in /Users/dpie/Sites/my_app)
  Unpacked gem: '/Users/dpie/Sites/my_app/vendor/gems/paperclip-2.3.1.1'

  $ sudo rake gems:install
  (in /Users/dpie/Sites/my_app)
  $ sudo rake gems:install
  (in /Users/dpie/Sites/my_app)
  gem install wysihat-engine --source http://gemcutter.org
  ERROR:  Error installing wysihat-engine:
    wysihat-engine requires thoughtbot-paperclip (>= 2.3.1, runtime)
  • Tried installing the normal gem way
  $ sudo gem install wysihat-engine
  ERROR:  could not find gem wysihat-engine locally or in a repository

  $ sudo gem install wysihat-engine --source http://gemcutter.org
  ERROR:  Error installing wysihat-engine:
    wysihat-engine requires thoughtbot-paperclip (>= 2.3.1, runtime)
  • Forced WysiHat Engine gem to ignore errors and install
  $ sudo gem install wysihat-engine --source http://gemcutter.org -f
  Successfully installed wysihat-engine-0.1.7
  1 gem installed
  Installing ri documentation for wysihat-engine-0.1.7...
  Installing RDoc documentation for wysihat-engine-0.1.7...

  $ gem list --local
  *** LOCAL GEMS ***
  ...
  paperclip (2.3.1.1)
  wysihat-engine (0.1.7)
  • Tried running the generate code without, then with 'sudo'
  $ script/generate wysihat
  -bash: script/generate: Permission denied

  $ sudo script/generate wysihat
  sudo: script/generate: command not found
  • Unpacked the gem and tried again
  $ sudo rake gems:unpack
  (in /Users/dpie/Sites/my_app)
  Unpacked gem: '/Users/dpie/Sites/my_app/vendor/gems/wysihat-engine-0.1.7'

  $ script/generate wysihat
  -bash: script/generate: Permission denied

  $ sudo script/generate wysihat
  sudo: script/generate: command not found

Verified that the generate file did in fact exist, then tried changing file permissions. Nothing worked. Any ideas?

Thanks!

  • Dave
@80beans
Copy link
Collaborator

80beans commented Oct 31, 2009

Hi Dave,

Thanks for this long description of you problem. Great to see you've taken the time to explain it :)

If I understand correctly, the problem is in the script/generate command. What version of Rails are you using? If the script/generate command can't be found, it's probably something with Rails. Do you have this problem in other Rails projects?

Could you try to install the WysiHat Engine Demo app (http://github.com/80beans/wysihat-engine-demo) to see if that works? You could try to run the generator in there to see if it regenerates the files in the project.

Thanks again!

Jeff

@dpie
Copy link
Author

dpie commented Nov 1, 2009

Hi Jeff,

This project is running Rails 2.3.4, upgraded from 2.0.2. I haven't needed to run script/generate since the update, so I'll play with that to see if its working in other cases. I'll also download the Demo app and test that.

Hopefully I just forgot to run some command during the 2.3.4 update or something!

Thanks,

  • Dave

@dpie
Copy link
Author

dpie commented Nov 2, 2009

Hi Jeff,

It appears there were two issues with my Rails 2.3.4 project.

  • It didn't update the /script/ files during 'rake rails:update'. To fix this, I created a fresh Rails 2.3.4 project and diff'd the changes into my existing project.
  • All my project files were 664 permissions, but the /script/ files need to be 755 permissions.

With those issues fixed, the script/generate command worked perfect.

Thanks!

  • Dave

@jeffkreeftmeijer
Copy link
Contributor

Awesome. If you have any problems in the future, don't hesitate to create a new issue! :)

This issue was closed.
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