Installing gitosis plugin in bitnami redmine missing lockfile - passenger

I've been working on this issue for quite some time now and I did not come up with an solution so far. I have installed redmine via a bitnami stack. I set up git via gitosis as well, and now I'm trying to install the gitosis plugin for redmine. But when I try to activate the plugin with "rake redmine:plugins:migrate RAILS_ENV=production" I get the following error:
rake aborted!
No such file to load -- lockfile
Tasks: TOP => db:migrate_plugins => redmine:plugins:migrate => environment
(See full trace by running task with --trace)
I ran the command with the use_redmine script. I already installed lockfile via "gem install lockfile". bundle check returns that all dependencies are satisfied, but I still can't get this thing to work.
After reading some similar questions here, I guess it could have something to do with the passenger module.

I figured it out now. Sorry, I forgot about my post here.
The solution was kinda dumb. I did install the required packages, but I did not include them in my Gemfile.
Developing Rails and even installing Rails Applications can be a real pain in the butt -.-

Related

Ruby: CLI script failing when requiring gems installed through git

I am patching a script, and want to run code from a repo I manage that has patches.
The gem in question is not installed through a published gem but through a github link
When requiring any gem that is normally installed. The script works. But requiring any gem that is installed through a github link fails. Any suggestions?
If I understand the problem correctly, there are a few solutions:
Clone the gem that's only available via the github link, build the gem locally, install it. You should be able to require it
You might be able to manage the project with bundler and a Gemfile. Instructions here for the syntax. Bundler basically does what I suggested above, for you. I don't think gem can install a gem from a remote natively?
Would love to see some more clarification, and if you're using a Gemfile the relevant snippets
So the issue was I was running the script in question using ./bin/path/script
This will not work if the script includes github referenced gems, you need to prefix this with bundle exec which is not immediately obvious, given that when you use non-github referenced gems, it works fine without it.
Now running bundle exec ./bin/path/script will work for both, it's probably just better using that wherever possible.

Apache/Ruby/Passenger misconfigured after Ubuntu 12.04 to 14.04 update

Well, I have to admit, that I'm down today. I've updated my Ubuntu and that rendered Redmine 2.1.2 completely dead. Any suggestions as of to what should I update or reconfigure? I'm trying not to use Ruby/Rails/Passenger blindly but it's tough as it's not my expertise. I'd like to USE Redmine instead.
Top of the Passenger error log is below, but feel free to check whole page at http://redmine.teacloud.net:
It looks like Bundler could not find a gem. Maybe you didn't install all the gems that this application needs. To install your gems, please run:
bundle install
If that didn't work, then the problem is probably caused by your application being run under a different environment than it's supposed to. Please check the following:
Is this app supposed to be run as the nobody user?
Is this app being run on the correct Ruby interpreter? Below you will see which Ruby interpreter Phusion Passenger attempted to use.
-------- The exception is as follows: -------
Could not find rake-10.3.2 in any of the sources (Bundler::GemNotFound)
/var/lib/gems/1.8/gems/bundler-1.3.4/lib/bundler/spec_set.rb:92:in `block in materialize'
• I have no idea, what user should this app supposed to be run as. Everything else uses www-data by default, however the redmine application folder in filesystem is owner by root.
• Everything was working for two years on ruby 1.8 that is not on my system now. I've managed to install lowest version 1.8.7, latest 2.1.2... and I have no idea where does the 1.9.1 get from.
• I don't understand how 'bundle install' and 'bundle update' is related to current ruby version switched to using rvm.
• I am not sure, at what point will my Redmine MySQL database be migrated or destroyed if I'll need to upgrade Redmine (so I have backup).
• bundle install didn't help, Apache runs ruby 1.9.1
Solution was simply as follows (whole failure path is documented here http://www.redmine.orgenter code here/boards/2/topics/43500?r=43514):
• Everything happens in the Redmine's installation folder:
• Went to GitHub (https://github.com/redmine/redmine/blob/master/Gemfile) and copied fresh database section to Redmine's Gemfile (ignoring the fact that I have Redmine 2.1.2 and Gemfile is far newer)
$ rvm use system
$ bundle install

Rake aborted when running "rake install" for Octopress?

I want to build Octopress on my Windows 8.1 system.
I installed Ruby 2.0.0, and DevKit in C:\devKit, then ran gem install bundler and bundle install.
They run successfully but when I run rake install, I always get an error message like:
rake aborted! cannot load such file --
C:/Users/username/Documents/GitHub/octopress/Rakefile
I think the problem is that my username is Chinese, but could there be another problem?
I've tried bundle update or bundle exec rake install but it didn't work.
I hope someone can help me.
Just to clean up this question and to supply the right answer.
I think the problem is that my username is Chinese, but could there be another problem?
The problem is that that current user has non English characters as the windows username.
This cause error and rake cant load the desired file.
Changing teh name or moving the the Octopress to a different folder fixed the problem.

Rails : Trouble installing attachement_fu on Heroku

I'm trying to deploy an app on heroku.
My trouble is to install hattachement_fu plugin.
I ran the following command to install it directly on the server.
heroku plugins:install http://github.com/technoweenie/attachment_fuand"
and I get the following message :
Unable to load plugin: some_plugin: uninitialized constant ActiveRecord
Already up-to-date.
attachment_fu installed
So seams that the plugin is installed but something get wrong above ...
But in my logs I continue to get :
NoMethodError (undefined method `has_attachment' for #<Class:0x2b3fed47a830>):
Like if the plugin was not there.
Any idea about what's going on ?
That's not how plugins work. The command you used is for installing plugins to the heroku command line tool.
If you want to install a Rails plugin, go to your project folder and script/plugin install foo (or however your version of rails installs plugins), commit it, then push to heroku.

rake aborted! stack level too deep [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
Rails 3.0 & Ruby 1.9.2rc: Rake commands return 'already initialized constant' & stack level too deep errors. Any ideas
Am using Ruby version 1.9.1 on windows vista. Am getting the rake aborted error for any rake commands am using. This does not happen in all my app folder. Its happening only on a specific app folder.
C:\rails_project\stunetwork>rake db:reset
(in C:/rails_project/stunetwork)
rake aborted!
stack level too deep
C:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rak
efile'
(See full trace by running task with --trace)
try placing bundle exec in front of the rake command.
bundle exec rake -T
You need to update your gem.
I met this error with gem '1.8.10', and fixed by upgrading to 1.8.16
gem update --system
I only had this problem with ruby-1.9.2-p180 via rvm.
Switching to ruby-1.9.2-p0 fixed the problem.
try "rvm use 1.9.2-p0"
The stack of the calls can depend on the gems you install (some gems monkeypatch the rails tasks) which explains why you would encounter this on a specific app and not on others.
On a unix system you could try using the ulimit command to increase your stack size. On the windows side I haven't found a solution yet.
Depending on which release of ruby you use on windows you may want to ask the maintainers how to increase the stack.
For ruby installer you will need to install the mingw compile environment, clone the github repository and recompile the ruby you use (not very sexy I admit).
I just encountered this exact error message on Ubuntu, and was able to solve it by downgrading rubygems from 1.8.3 to 1.7.1.
There is nice post by Yehuda Katz that explains why without bundle exec there can be version conflicts:
http://yehudakatz.com/2011/05/30/gem-versioning-and-bundler-doing-it-right/
There is also bundle install --binstubs command that allows to version-safely run rake db:reset like this: bin/rake db:reset.

Resources