Snorby / snorby

Ruby On Rails Application For Network Security Monitoring
Other
1k stars 226 forks source link

Bundle install fails after commit 7bc97f3bdd #323

Open Mister-X- opened 11 years ago

Mister-X- commented 11 years ago

Hi,

bundle install fails with the latest source and reverting latest commit, 7bc97f3bdd, fixes the issue. Here is the error I'm getting with latest revision:

You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.

You have added to the Gemfile:
* source: https://github.com/Snorby/delayed_job_data_mapper.git (at master)
* source: https://github.com/mephux/ezprint.git (at rails3)
* source: https://github.com/Snorby/snorby_cas_authenticatable.git (at master)

You have deleted from the Gemfile:
* source: http://github.com/Snorby/delayed_job_data_mapper.git (at master)
* source: http://github.com/Snorby/snorby_cas_authenticatable.git (at master)
* source: http://github.com/mephux/ezprint.git (at rails3)

You have changed in the Gemfile:
* devise_cas_authenticatable from `https://github.com/Snorby/snorby_cas_authenticatable.git (at master)` to `no specified source`
* ezprint from `https://github.com/mephux/ezprint.git (at rails3)` to `no specified source`
* delayed_job_data_mapper from `https://github.com/Snorby/delayed_job_data_mapper.git (at master)` to `no specified source`

The only files I modified were the database and snorby configuration file. The rest of them were left untouched. And I got the sources using git clone.

djcas9 commented 11 years ago

You need to remove the gemfile.lock and the /vender/cache and bundle install again.

djcas9 commented 11 years ago

Let me know if this doesn't work.

Mister-X- commented 11 years ago

No it doesn't. And there is no vendor/cache directory.

Here is the error I get:

The --deployment flag requires a Gemfile.lock. Please make sure you have checked your Gemfile.lock into version control before deploying.

I'm not familiar with Ruby and I wonder how do you explain the first error I got (You are trying to install in deployment mode after changing your Gemfile)? And why does Ruby cares so much about version control?

igoking commented 11 years ago

I get the same error. I'm trying to install it over Ubuntu 13.10. I show you the output. It happends when I execute the command "bundle install":

user@snort:/var/www/snorby# bundle install You are trying to install in deployment mode after changing your Gemfile. Run bundle install elsewhere and add the updated Gemfile.lock to version control.

If this is a development machine, remove the Gemfile freeze by running bundle install --no-deployment.

You have added to the Gemfile:

You have deleted from the Gemfile:

You have changed in the Gemfile:

Can you help us please?

Thank you very much!

Mister-X- commented 10 years ago

Any update on the issue? If you don't have time to fix it, do you have any pointer to explain how I can fix it so that I can submit a patch?

da667 commented 10 years ago

While I can't guarantee this work for everyone, I managed to get bundler to work, after someone reported this same issue in a small project of mine that automates snorby installation. Here are the steps I followed:

  1. Made a backup of the Gemfile.lock, called Gemfile.lock.bak
  2. Removed the Gemfile.lock, attempted to remove vendor/cache and it didn't exist yet. ran bundle install to no effect; same error occurred.
  3. Ran bundle install --production to the same effect; same error occurred.
  4. Ran bundle install --no-production and bundler actually worked. the packages were pulled down, and everything seemed happy.
  5. Because I wasn't sure if there was a difference between the no production and production gem set for Snorby, I decided to try to re-run bundle install --production and now, inexplicably, that also worked.
  6. ran rake snorby:setup, and everything went by without a hitch.
  7. Was able to successfully log into the snorby web interface with default creds.

To Mephux/Snorby crew: 1) is there a difference between the production gems and no production gem setup? 2) Why is this error occurring, and why does running bundle install --no-product followed by --production seem to fix it? 3) What other data can I provide to resolve this problem?

My system: Ubuntu 12.04 LTS with ruby 1.9.3-p484 passenger 4.0.36 Apache 2

modix commented 10 years ago

On Debian Wheezy the above works for me. I just had to change --no-production, --production to --no-deployment, --deployment.

Mister-X- commented 10 years ago

I kinda figured out the issue. On snorby.org, it tells to do "git clone http://github.com/Snorby/snorby.git" and that's when the issue happens. If you replace the http by https, everything works fine.