How to properly install Ruby on Rails on Fedora 22?
I recently tried to install Ruby on Rails on Fedora 22 x64 and I don't get webbrick to start. I did the same installation on Fedora 22 x86 and it worked right away.
Steps I performed:
- installing
rubygem-rails
andruby-devel
- creating a new application via
rails new my-app
(successfully) bundle install
in the new app folder- starting webbrick via
bin/rails server
Error message I got:
bin/rails:6: warning: already initialized constant APP_PATH
I had some problems with nodejs installed in parallel, so I removed nodejs. Unfortunately, this didn't workout.
I'm quite confused by the bundling of rubygems in Fedora, as some of the gems are available via dnf. Should I prefer to install these instead of local installation via bundle install
?
How can I properly install Rails?
Additional info:
$ echo $APP_PATH
$
What normally do is install ruby and rubygem-bundler and then install rails and all other gems using gem and bundle. Installing rails as a rubygem-rails will install rails but normally the version fedora support. if you are using rails installed with rubygem-rails then it should work with no problem, what the error there show it that the enviroment variable APP_PATH has already been initialized so you should be ablle to do
and see what was set to, maybe that indicate what is your issue.
Hope this help
@aeperezt: Thanks for the info! The installation failed this way, too. I removed everything and only installed
rubygem-bundler
andruby
and then ran abundle install
in the app folder. This didn't change the outcome. The variable $APP_PATH is empty, see post @MikeCZ: Thank you! I read about rvm, but was unsure if this is a good way. Care to elaborate how to use RVM in Fedora? Thank you very much!You must check your .bash_profile and .bash_rc because some how the APP_PATH enviroment variable is already set, with an empty value but it is set and that is the cause of the issue.
@MikeCZ Could you convert your comment to an answer? RVM worked for me quite well, so I would accept this answer. Thanks!