Stuck with Piggybak install - ruby-on-rails-3

I have followed the base application and installation docs. I have Devise,Rails_Admin, and Cancan installed and bundled. I think I followed those install docs too. I have the admin set up and I can add users. But when I do the piggybak install I get an error. I have pulled my repo and done this three times but still cant't get past here. Any help from anyone who has installed piggybak successfully.
$ piggybak install
add reference to devise in GEMFILE
insert GEMFILE
/home/jason/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.16.0/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory - /home/jason/work/kpipe/GEMFILE (Errno::ENOENT)

make a temporary link in your home project to point to your Gemfile
ln -s Gemfile GEMFILE
Then run the piggybak install.
It suppose it is an error in piggybak, maybe they develope it on windows machine where the case doesn't matter.

Related

Gem installation error for non-root user

I did RVM single user installation on my CentOS server as root user, so rvm location is /usr/local.. However, now we have to use individual user accounts.
So now if I try to install a new gem, for instance -
gem install linecache19 -v '0.5.12'
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/local/rvm/gems/ruby-1.9.2-p320#cams directory.
sudo gem install linecache19 -v '0.5.12'
/usr/local/rvm/rubies/ruby-1.9.2-p320/bin/gem:12:in `require': no such file to load -- rubygems (LoadError)
from /usr/local/rvm/rubies/ruby-1.9.2-p320/bin/gem:12
Point to note: I thought of re-installing the rubies and rvm with individual user account and do away with root installation. But I already have some apps running on the server as staging, so want to avoid this.
How can I solve these problems?
You obviously missed to read RVM installation documentation and overall RVM docs.
For part 1. you need to run rvmsudo rvm get stable and add your users to rvm group.
For part 2. do not use sudo it looses all environment settings - which leads to the error you see, either add your users to rvm group or run with rvmsudo.

git://github.com/ryanb/nested_form.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)

I have deployed my application on linux server with passenger and apache, I have done bundle install run successfully still i get
( git://github.com/ryanb/nested_form.git (at master) is not checked out. Please run bundle install (Bundler::GitError) ) error while i try to run my application
FYI, i am using rails 3.2.3 and ruby 1.9.3
This works fine on my development machine
Any Idea ?
I have currently solved the issue by running below
bundle pack
bundle install --path vendor/cache
This solves my problem, but it stores whole gems in the vendor directory
But still if anybody have better solution then please let me know
I had the same problem, I always installed my gems as system-wide gems (including the ones from github).
$ sudo bundle install
When I ran rails, I got the same error:
$ rails s
http://github.com/Sija/garb.git (at master) is not checked out. Please run `bundle install`
So when I ran:
$ bundle install
This installed the gems from github locally, but otherwise used all the other system-wide gems.
Then when I ran rails again, it worked.
Are you running bundle install as root? If yes, try running bundle install without "sudo", anyway this seems to be a permissions problem (as Google suggests [google => (at master) is not checked out. Please run bundle install (Bundler::GitError)])1

Bundle install keeps installing to ./runner

Not sure what's going on here, but in my Rails 3 application, I type bundle install and at the end if says Your bundle is complete! It was installed into ./runner.
Weird because I have no idea where runner is coming from!
If I recall correctly, if you run something like bundle install ./runner it will remember the path ./runner. bundle install --system should fix it. i think.
See the manpage:
--path=<path>
The location to install the gems in the bundle to.
This defaults to the gem home, which is the location
that gem install installs gems to. This means that, by
default, gems installed without a --path setting will
show up in gem list. This setting is a remembered option.
--system
Installs the gems in the bundle to the system location.
This overrides any previous remembered use of --path.

'bundle install' is creating ./rails folder

I'm running a Rails 3.0.3 app using RVM (Ruby 1.8.7). When I run bundle install all the gems install and then I get this message Your bundle is complete! It was installed into ./rails. But the app isn't recognizing/see those gems. Not sure what I've done wrong that it's doing this. Let me know if you need any other information.
I bet you accidentally ran bundle install rails at one point, which configured your bundler to install your gems into the ./rails directory.
To reset that, remove the ./.bundle directory (or remove the BUNDLE_PATH line from ./.bundle/config). Then bundle install will put them in the right spot.

Project folders and gems for Rails 3

I am new to Rails and have been trying to setup up my Mac to handle some development. I am currently in a project folder and trying to install a Gem and get this error:
*bash-3.2$ gem install pg
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /Library/Ruby/Gems/1.8 directory.*
It appears its trying to install this to the 1.8 directory. I would like all gems to be installed only for this project and not for everything.
Here is my folder structure for Rails projects.
Rails Projects:
Project 1:
Project 2:
How do I correct the issue with the gem installation so it only goes into a specific folder. This goes for the ruby version as well.
Thanks for the help.
You need to be using RVM, the Ruby Version Manager, found at http://beginrescueend.com/
I assume you already have installed XCode and Macports (or something like it).
Install rails using "gem install rails"
Use "rails new new-project" to setup your new rails project
Use bundler to add any new gems to your project http://gembundler.com/
Finally, if you want to use MySQL, there is a trick to getting the mysql2 gem configured properly on Mac. That is covered in this stackoverflow post.
Without installing RVM, which you should be doing anyway, you just need to use sudo to install the gems. By default, your user account does not have write permissions to the default gem installation directory.
sudo gem install pg