I'm a beginner to Ruby on Rails tutorials and the last thing I did was create a new app, generate scaffolding without Tests (- T flag), installed RSpec, and initiated a git repo in the folder.
That was two hours ago. I open my laptop up, try to run:
rails server
Now I'm seeing this error:
/Users/reneruiz/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/
rubygems/requirement.rb:72:in 'parse': Illformed requirement ["0.7.1."] (ArgumentError)
The full stack trace is here: http://cl.ly/4pQC
I did some Google searches and I can't seem to find anyone else with the same problem.
I don't know how or where to go from here. Would seriously appreciate some help.
Check your Gemfile for version requirements that look like "0.7.1." It looks like Bundler is trying to check for a gem with a certain version and is choking on the trailing period. If you find the version in your Gemfile, fix it and then run bundle install on the command line, and see if it'll start.
Instead of only bundle install run bundle install --full-index
Related
I am setting a new app, stack is:
ruby: 2.6.1 (using rvm)
rails: 5.2.2
bundler: 2.0.1
Now thing is, bundler 2 doesn't use Gemfile at all, i have proper gems.rb and gems.locked and everything was working properly until i pulled some code from a co-worker which got merged.
Issue is whenever i run any rake or rails command i get this error:
/path/to/proj/Gemfile not found
I then even tried going back to old master when that code was not merged and issue is still there. So it is probably not something in the code i pulled.
And issue seems persistent in different machines.
I know there are other issues which have similar errors of Gemfile not found but those are mostly those which had wrong directory opened or some gem issued fixed by bundle update or gem update type commands, this is not that issue because. This is something else, because bundler 2 doesn't even need Gemfile.
It looks like rails doesn't support using gems.rb and gems.locked. https://github.com/rails/rails/issues/31295
You could try what that guy did and edit some files, or you could rename your gems.rb back to Gemfile and gems.locked back to Gemfile.lock
I am new to the whole ruby rails scene, and I am installing for the first time. I have followed the instructions to a T, including putting everything in the suggested directories. I've been researching this issue for hours and the closest I came to a fix is reinstalling and that did not work.
My issue is, while following the install instructions from railsbridge.org and upon reaching step 2.2, when I try to run bundle install, it keeps stating "The system cannot find the path specified." This worked fine up until this point in the tutorial.
I had the same problem. Missing Bundler installation.
use
gem install bundler
and try again :)
I am super, super new at programming and I have been trying to get everything set-up on my computer. I have installed RailsInstaller, go to >railsinstaller_demo, and type in rails s. I get the following error though could not find gem 'uglifier <>= 1.0.3> x86-mingw32'
I looked through the forum and found how to do a gem list and i noticed it was not there. I then went to gembundler and ran $ gem install bundler. I tried again but it did not work.
I am sure the answer is on this site, but i am so new that i see all these lines of code I actually have no idea where to type it in.. I am running Windows 7.
thanks for taking the time to help out a real beginner.
Have you gone to the $ railsinstaller_demo directory and run the bundle install command? This will install the gem dependencies for the application; you will not be able to run the server until you've bundled the gems. Additionally, if you're still having issues with the uglifier gem, go ahead and remove the line in the Gemfile and then run bundle install
If you need further help with the Command Prompt, you an find out more at http://bit.ly/ZajVeW.
Thanks,
Evan
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 am trying to build Noosfero (http://noosfero.org/), a project done in Ruby, but I am pretty new in Ruby and Linux (my current environment).
I am following the instructions in their tutorial (http://gitorious.org/noosfero/noosfero/blobs/master/INSTALL and http://gitorious.org/noosfero/noosfero/blobs/master/HACKING).
I was supposed to run an apt-get install with many packages, everything worked except for libgettext-ruby-data, to which I get a message that "E: Package libgettext-ruby-data has no installation candidate".
I then download the source and try to run "rake db:schema:load", which I get the following error:
"rake aborted!
uninitialized constant Dependencies
/home/user/noosfero/Rakefile:10"
My rake file is the following:
require(File.join(File.dirname(FILE), 'config', 'boot'))
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require 'tasks/rails' #this is the line that the dependency can't be found
I searched around and found this question here: Uninitialized constant ActiveSupport::Dependencies::Mutex (NameError) , but changing the config files didn't help and I could wasn't able to downgrade my RubyGems because I do not know how to do that (gem -update returns a message that I have to do that using apt-get, but I can't find out in which package the gem program is).
The first time I run Rake, I get a message saying:
"I: Installing Debian-installed Rails from /usr/share/rails into vendor/rails.
I: Please note that the recommended Rails version is 2.1.0, and that other versions might not work"
But I don't know how to downgrade my Rails version.
I've got many paths to follow, so I've got many questions, I hope you can help me:
1- Does anyone knows how to fix it directly?
2- How can I downgrade Gems?
3- How can I downgrade Rails?
4- Where can I download gems and how can I install it? (The documentation provides a link, but this link is VERY strange: http://www.yotabanana.com/hiki/ruby-gettext.html?ruby-gettext ).
Any help is very appreciated.
Thanks,
Oscar
Edit: can this error be a problem in the project I downloaded and not in my environment? After some research I am starting to think it is, can it be?
It would help if you share your rake version, by the way.
In the meantime, take a look at this:
https://github.com/jimweirich/rake/issues/33
(Only valid for rake 0.9.0, though).
This was a version conflict I had with the project I was trying to build, not it is solved :)
First of all, I'm a Noosfero developer and I need to admit that the process of preparing the environment to run Noosfero right now is pretty nasty (unless you only want to run it in the production mode since we've got a debian package). But this problem is close to an end since we're a building a vagrant box (for more info see http://vagrantup.com/) to noosfero. Things are going to be much better. But regardless all this nastiness and not having the box yet, Noosfero was supposed to run if you followed all the steps in the INSTALL instructions. Let me try to help you.
Are you using Rails 2.1.0? The best way to do so is to uninstall rails from your system (if you installed through apt-get) and install through rubygems:
gem install rails -v=2.1.0
To avoid problems ensure that there isn't any other version of rails installed through rubygems (gem list).
If you still having problems to run the schema load, run it with --trace and post it here.
If you have other problems you can try contacting us through noosfero-dev#listas.softwarelivre.org or the irc #noosfero at FreeNode.