Tag: github

jekyll插件无法在github上运行

我想通过使用jekyll-plugins / weighted_pages.rb来改变导航栏中页面的顺序。 这个插件在我的localhost上运行得非常好,但是github。 我发现导航栏在github主机上是空的,看起来这个插件不起作用。 我怎么解决这个问题? 我复制下面的weighted_pages.rb代码: # Generates a copy of site.pages as site.weighted_pages # with pages sorted by weight attribute. Pages with no # weight specified are placed after the pages with specified weight. module Jekyll class WeightedPagesGenerator < Generator safe true def generate(site) site.config['weighted_pages'] = site.pages.sort_by { |a| a.data['weight'] ? a.data['weight'] : […]

创建Git提交并使用Ruby推送到GitHub

我正在开发一个Web应用程序,用户将在其中修改文件(在GitHub上托管),并且应该能够直接保存到GitHub。 我不需要处理这个客户端,因此服务器端的Ruby解决方案就可以了。 我假设我需要使用某种GitHub API。 我该怎么做呢?

Nanoc在github中部署页面时更改基本路径

我有一个简单的静态页面应用程序,我用nanoc构建,我想将其部署为github页面。 一切顺利,除了资产(如css,javascripts)和所有链接一般指向回购的根目录: 喜欢 /css/style.css 而不是 /docs/css/style.css 一切在localhost上运行良好但在发布时失败。 我正在使用rake发布将其推送到gh-pages。 这是我的Rakefile require ‘nanoc3/tasks’ BASE_URL = “http://darko1002001.github.com/docs/” desc “Compile the site” task :compile do `nanoc compile` end desc “Publish to http://documentation.getchute.com” task :publish => [:clean] do FileUtils.rm_r(‘output’) if File.exist?(‘output’) sh “nanoc compile” ENV[‘GIT_DIR’] = File.expand_path(`git rev-parse –git-dir`.chomp) old_sha = `git rev-parse refs/remotes/origin/gh-pages`.chomp Dir.chdir(‘output’) do ENV[‘GIT_INDEX_FILE’] = gif = […]

我可以在gemfile中强制gem的依赖吗?

如果有两个gem, A和B A1.0.0取决于B1.0.0 。 在我的Gemfile中: gem ‘A’, ‘~> 1.0.0’ 然后运行bundle 。 它将生成一个Gemfile.lock,如: A (1.0.0) B (1.0.0) 但如果我想强制A使用B1.0.1 ,那么最佳做法是什么? 此外,如果B1.0.1不是发布而是github标签?

如何在带有bundler的项目中使用rails中的分支

我在github上有一个rails repo的分支,其中我有一个分支,基于rails-2-3-stable分支。 我想基于rails 2.3.10和我的应用程序开发一些更改。 我们正在使用bundler,该应用程序版本化为SVN。 在github的rails中使用我的分支并在机器上共享这个最简洁的方法是什么? 一种方法是: 如何安装边缘导轨? 哪个会工作,但感觉不够干净,因为当repo改变时我们必须手动更新销售版本,我们必须检查git repo到svn。 我在Gemfile中尝试过这种变体: gem ‘rails’, ‘2.3.10’, :git => ‘git://github.com/traveliq/rails.git’, :branch => ‘tiq-fixes’ gem ‘rails’, ‘2.3.10’, :git => ‘git://github.com/traveliq/rails.git’, :tag => ‘v2.3.10’ gem ‘rails’, ‘2.3.10’, :git => ‘git://github.com/rails/rails.git’, :tag => ‘v2.3.10′ 所有这些最初都在运行bundle install时工作,但在启动应用程序时,它无法在加载路径中找到rails: /home/mt/Development/config/boot.rb:57:在`require’中:没有要加载的文件 – 初始化程序(LoadError) 来自/home/mt/Development/config/boot.rb:57:in,load_initializer’ 来自/home/mt/Development/config/boot.rb:117:在’run’中 来自/home/mt/Development/config/boot.rb:11:in`boot!’ 来自/home/mt/Development/config/boot.rb:130 来自脚本/控制台:2:在`re 我的Gemfile.lock条目是这样的: GIT remote:git://github.com/traveliq/rails.git 修订:25139ac92cea5b17791d71359bc3ae2a5d526652 分支:tiq-fixes 眼镜: 铁轨(2.3.10) […]

没有这样的文件或目录 – git ls-files – WINDOWS

我试图找到一种方法将Git添加到Windows路径。 每当我尝试从JetBrains的整洁IDE,RubyMine或GitBash本身运行RakeFiles时,我都会收到此标题发布的错误: No such file or directory – git ls-files 根据开发人员的说法,我需要将Git添加到我的Windows路径中。 我无法找到如何解决这个错误的任何东西,但Macs。 有没有人可以帮我弄清楚如何解决这个问题?