Does anyone know of a tutorial or detailed instruction set for installing Fat Free CRM? The instructions on github are clearly meant for experienced rails developers not stupid newbies like me.
When I try downloading the source code to my Mac, rails won't work and I get dozens and dozens of errors when I try to start the server. (There are way too many to even post here) I also tried setting up a new app and painstakingly copying and pasting the files from the source into the new app after it complained numerous times that it could not find the rails server. Now it continues kvetching about syntax errors and dependencies in a dozen or so files and complaining about my gems.
I did properly update the database yaml file and have tried updating my gems and running bundle many, many times but the spaghetti bowl of errors never seems to resolve much. This is the latest Rails 3 version of the app so why would it not work and why does it seem to think that half the gems are deprecated? Other people don't seem to be getting these types of errors.
I'm clearly missing something that is plainly obvious to the rest of the world and have somehow majorly screwed up the installation. How does the process of downloading a complete app differ from installing a plugin? (I've never had this much trouble with plugins.) Does anyone know of an idiot-proof checklist for downloading, installing and setting up this app? After three months of trying to make this work, I am beyond frustrated.
Thanks so much.
The first places to look
1) The Wiki Guide
2) The Readme
Here are the steps I took on Ubuntu, mostly in this order. Remember to try to complete each step without getting errors. If you get errors then it won't work.
sudo cp -r fatfreecrm/ /var/www (Copy crm to your www root)
sudo apt-get install rails (install rails + ruby + mysql)
cd /var/www/fatfreecrm
cp config/database.mysql.yml config/database.yml (copy mysql config over)
chmod 777 config/database.yml (set write permissions)
vim config/database.yml (set db password, remove /tmp/mysql.sock )
gem install bundler (install bundler)
PATH=$PATH:/var/lib/gems/1.8/bin/ ( put bundler on your path, or not )
sudo gem install mysql2 -- --with-mysql-dir=/etc/mysql/ (install mysql2)
sudo /var/lib/gems/1.8/bin/bundle install (install bundle gems)
rake db:create
rake crm:setup
rake crm:demo:load
rake crm:settings:load
sudo ruby script/rails server
Good luck finding what works for you!
Related
I am trying to get started with Rails, following the guide at https://guides.rubyonrails.org/getting_started.html, but I'm running into problems.
I've got ruby, sqlite3, and rails installed as required, and then run
rails new blog
as indicated in section 3.2 of the tutorial. I get an error saying "Your user account isn't allowed to install to the system RubyGems.", but I can install the gems into ./vendor/bundle, as suggested (I don't have full root access on this machine).
So far, so good. But then
rails webpacker:install
is run by the process, which gives me the following message:
Yarn not installed. Please download and install Yarn from https://yarnpkg.com/lang/en/docs/install/
Of course, I went to that website and checked the instructions for my Fedora system and tried to follow them. The problem is again: I have limited root access, I cannot run the suggested commands; in particular, I cannot write to /etc/yum.repos.d/yarn.repo.
I also googled a bit, and what I could do is following https://developer.fedoraproject.org/tech/languages/nodejs/nodejs.html to install Node.js and Yarn (including setting the alias yarn for nodejs-yarn). But still, running
rails webpacker:install
says that Yarn is not installed.
Any help is greatly appreciated, I have to admit that I don't really know what I'm doing. Thanks!
On linux, the sudo command is the intended way to temporarily elevate user privledges.
wget https://yarnpkg.com/install.sh
sudo ./install.sh
That should get Yarn installed for you. The other problem it seems your having is installing ruby gems. You should be able to write to the vendor directory of your application by default, so make sure that you're doing this project in your /home/<MY USER NAME HERE> directory.
Bit of a strange question, but here goes.
I'm a relative beginner to rails, and I've just started working on my second app locally. However, after each install I'm getting the following problem - that several gemfiles are missing (railties being the most obvious).
So, I deleted the install, re-ran it and listed the gemfiles - they are all there. However, after initializing a git repo and pushing the project up to my GitHub a gem list command shows that a number of gems are now missing - at this point I can't run any rake commands or for example rails server.
So I cleared the repo and re-installed. gem list says the gems are all present, server and rake commands work; but push the repo and it subsequently packs up - gem list shows only a handful of gems remain.
Bearing in mind my experience, I'm prepared to believe I'm missing something very obvious, but any advice would be appreciated.
welcome ;-)
I suppose you want to create a Rails 3 application. So first make sure you have installed bundler.
gem install bundler
The steps for creating the application are:
rails new your_app
Then run bundler in the applications folder:
cd your_app
bundler install
Now you should be able to run the application:
rails s
Go and visit localhost:3000. If that does not work, you have other problems. Paste the stack trace then ...
The problem was I forgot that I had two versions of Ruby installed and I had not properly set a default with rvm for some reason. Specifying the default then checking the gems were present for that version of Ruby fixed it.
I have a RoR application running on box1...it obviously has Ruby, RubyGems, and Rails installed on that box, along with a few other gems.
I want to copy this whole set-up so it runs independentally on box2 as well.
Neither box has an internet connection, but an internet connection is available on another machine.
So as far as I can see, I need to-
Install Ruby on box2 (I have an RPM, no problem)
Install RubyGems on box2 (I have an RPM, no problem)
Install Rails (How do i do this?)
Copy over entire Rails app directory onto box2?
The only guidance on the Ruby on Rails site is to run gem install rails but I cannot do this without an internet connection.
So can I just run bundle package on box1, then copy over the resulting gem files onto box2 and do a local gem install on each one to install them?
Or can I simply copy 'usr/local/lib/ruby/gems/1.9.1/gems' directory onto box2?
Secondly, I plan on packing my Rails app into an RPM so I can easily deploy it wherever I want...can I just include my gem files (resulting from bundle package) in the RPM directory structure, and then direct the RPM in the .spec file to do a gem install during installation? That way it'll install the required gems as the RPM is being installed.
It's possible I'm overlooking a much simpler method, or misunderstanding something, if so, please enlighten me. Any help?
Take a look at Vagrant and the Railscasts episode.
Vagrant will solve your "deploy anywhere" problem by putting everything in a virtual machine that has all your gems installed.
Of course, this won't solve your immediate problem due to lack of internet access but it does sound like you're on the right track.
As an example, I want to download: https://github.com/banker/newsmonger and tinker with it (to learn Rails). I've downloaded the zip and when I go into that folder and type rails server, the terminal window says to create a new rails app
This is a Rails 2 application, and so as ennuikiller said, you'll need to run script/server.
You may run into problems with dependencies not being installed in this application, which is a problem that normally (now) would be solved with Bundler. Due to this being a Rails 2 application, it doesn't support Bundler out of the box and the owner of the repo hasn't updated it to support that, and so you're dead outta luck there.
What you'll need to do is attempt to run rake gems:install (which may or may not work, depending on the sun's positioning) which will install the gems specified in config/environment.rb and the proper config/environments files using the config.gem methodology. This was how it was done in Rails 2, and caused so many problems that Bundler was created.
If that doesn't work, contact that banker guy on GitHub and ask him what the deps are or work out the dependencies yourself.
Good luck!
Depending on the version of rails this app uses you may have to execute the following :
script/server
I guess I messed things up a little bit:
I wanted to play around with Ruby on Rails a little bit. I installed it a year ago but never used it. Till now.
Because of some problem a ran into I wanted to start from beginning with a fresh install. I uninstalled the Rails gems (3.0.7 and 3.1.1) and followed this guide for a fresh install: http://eddorre.com/posts/rails-ultimate-install-guide-on-os-x-snow-leopard-using-rvm-homebrew-and-passenger
But now gem does nothing - when I type gem install bundle in my terminal the cursor goes straight to the next line. Even gem list or gem --help doesn't work. I get no error messages.
I have no clue what happened. Some thoughts?
I'll do a full reinstall of rvm:
rvm implode
and start again:
bash <<(curl -s https://rvm.beginrescueend.com/install/rvm)
If you try to recover the existing environment, there are some options to rvm that can be useful:
debug - show info plus additional information for common issues
upgrade - Lets you upgrade from one version of a ruby to another,
including
migrating your gemsets semi-automatically.
cleanup - Lets you remove stale source folders / archives and
other miscellaneous
data associated with rvm. repair - Lets you repair parts of your environment e.g. wrappers, env files and
and similar files (e.g. general maintenance).
Since you're trying to start over anyway, I would highly recommend that you use RVM. Do the "single user install" and these gem problems should disappear entirely. Then if you get a specific error message, post that so we have something to go on.
Please run this command in your console:
gem env
This command will return your gem environment, and one more correction: I guess it should be 'gem install bundler' not 'gem install bundle'.